Skip to content

EntityWorld.RemoveSystem Method

Definition

Namespace: Brine2D.ECS

Overloads
RemoveSystem(ISystem) Removes a system from this world. If the system implements multiple pipeline interfaces it will be removed from all. Disposal is deferred until the next Brine2D.ECS.EntityWorld.ProcessDeferredOperations call so that systems are never disposed while the update/render loop is iterating.
RemoveSystem<T>() Removes a system of the specified type from this world. If the system implements multiple pipeline interfaces it will be removed from all.

EntityWorld.RemoveSystem(ISystem) Method

Removes a system from this world. If the system implements multiple pipeline interfaces it will be removed from all. Disposal is deferred until the next Brine2D.ECS.EntityWorld.ProcessDeferredOperations call so that systems are never disposed while the update/render loop is iterating.

public bool RemoveSystem(Brine2D.ECS.ISystem system);

Parameters

system ISystem

Implements RemoveSystem(ISystem)

Returns

System.Boolean

Remarks

The Brine2D.ECS.EntityWorld._registeredSystems lookup is cleared immediately so that AddSystem<T>(Action<T>) can re-register the same type within the same frame, while the actual pipeline removal is deferred. This means Brine2D.ECS.EntityWorld.GetSystem<> will return null for the removed type before the pipeline has been pruned.

EntityWorld.RemoveSystem\<T>() Method

Removes a system of the specified type from this world. If the system implements multiple pipeline interfaces it will be removed from all.

public bool RemoveSystem<T>()
    where T : class, Brine2D.ECS.ISystem;

Type parameters

T

Implements RemoveSystem<T>()

Returns

System.Boolean