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

T

Exceptions

System.NullReferenceException
if entity has no component of Type T

Remarks

Executes in O(1)

Contents

  1. 0.1Friflo.Engine.ECS.Entity
  2. 1Entity.GetComponent() Method
  3. 1.1Remarks