Click or drag to resize

IEntityManagerAddComponentT Method (EntityId, Object)

Adds a component of the specified type T to the specified entity with the specified constructor args.

Namespace:  SampSharp.Entities
Assembly:  SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
T AddComponent<T>(
	EntityId entity,
	params Object[] args
)
where T : Component

Parameters

entity
Type: SampSharp.EntitiesEntityId
The entity to add the component to.
args
Type: SystemObject
The arguments of the constructor of the component.

Type Parameters

T
The type of the component to add.

Return Value

Type: T
The created component.
See Also