Click or drag to resize

ComponentAddComponentT Method (Object)

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

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

Parameters

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