Click or drag to resize

IEntityManagerAddComponentT Method (EntityId)

Adds a component of the specified type T to the specified entity.

Namespace:  SampSharp.Entities
Assembly:  SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-local+709673996c0cc3c0733358a87691d1009326afa7
Syntax
C#
T AddComponent<T>(
	EntityId entity
)
where T : Component

Parameters

entity
Type: SampSharp.EntitiesEntityId
The entity to add the component to.

Type Parameters

T
The type of the component to add.

Return Value

Type: T
The created component.
See Also