Entity.RemoveScript_TScript_().md

February 25, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.Entity

Entity.RemoveScript() Method

Remove the script with the given TScriptSystem.Type from the entity.

public TScript RemoveScript<TScript>()
    where TScript : Friflo.Engine.ECS.Script, new();

Type parameters

TScript

Returns

TScript
The script the script with the passed TScriptSystem.Type previously added to the entity.
Or null if the entity has no script with the passed TScriptSystem.Type.

Remarks

Note: Use RemoveEntityScript(Entity, ScriptType) as non generic alternative.