Click or drag to resize
ComponentManagerAddComponent Method
Attaches the passed component to the entity with the specified id. Note that this manager does not check whether the specified id is valid.

Namespace: Slash.ECS.Components
Assembly: Slash.ECS (in Slash.ECS.dll) Version: 1.0.6018.40178
Syntax
public void AddComponent(
	int entityId,
	IEntityComponent component
)

Parameters

entityId
Type: SystemInt32
Id of the entity to attach the component to.
component
Type: Slash.ECS.ComponentsIEntityComponent
Component to attach.
Exceptions
ExceptionCondition
ArgumentNullException Passed component is null.
InvalidOperationException There is already a component of the same type attached.
See Also