EntityExtensions.Set_T1_(thisEntity,T1).md

March 31, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.EntityExtensions

EntityExtensions.Set(this Entity, T1) Method

Set the passed component on the entity.

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

Type parameters

T1

Parameters

entity Entity

component1 T1

Exceptions

MissingComponentException
if the entity does not contain a passed component.