EntityExtensions.Set_T1,T2,T3,T4_(thisEntity,T1,T2,T3,T4).md

March 31, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.EntityExtensions

EntityExtensions.Set<T1,T2,T3,T4>(this Entity, T1, T2, T3, T4) Method

Set the passed components on the entity.

public static void Set<T1,T2,T3,T4>(this Friflo.Engine.ECS.Entity entity, in T1 component1, in T2 component2, in T3 component3, in T4 component4)
    where T1 : struct, Friflo.Engine.ECS.IComponent, System.ValueType, System.ValueType
    where T2 : struct, Friflo.Engine.ECS.IComponent, System.ValueType, System.ValueType
    where T3 : struct, Friflo.Engine.ECS.IComponent, System.ValueType, System.ValueType
    where T4 : struct, Friflo.Engine.ECS.IComponent, System.ValueType, System.ValueType;

Type parameters

T1

T2

T3

T4

Parameters

entity Entity

component1 T1

component2 T2

component3 T3

component4 T4

Exceptions

MissingComponentException
if the entity does not contain a passed component.