Click or drag to resize
EntityManagerAddComponentT Method (Int32)
Attaches a new component of the passed type to the entity with the specified id.

Namespace: Slash.ECS.Components
Assembly: Slash.ECS (in Slash.ECS.dll) Version: 1.0.6018.40178
Syntax
public T AddComponent<T>(
	int entityId
)
where T : new(), IEntityComponent

Parameters

entityId
Type: SystemInt32
Id of the entity to attach the component to.

Type Parameters

T
Type of the component to add.

Return Value

Type: T
Attached component.
See Also