Entity.GetComponent_T_().md
February 25, 2024 ยท View on GitHub
Friflo.Engine.ECS
Friflo.Engine.ECS.Entity
Entity.GetComponent() Method
Return the component of the given type as a reference.
public ref T GetComponent<T>()
where T : struct, Friflo.Engine.ECS.IComponent, System.ValueType, System.ValueType;
Type parameters
T
Returns
Exceptions
System.NullReferenceException
if entity has no component of Type T
Remarks
Executes in O(1)