Method DestroySystemManaged
DestroySystemManaged(ComponentSystemBase)
Destroys one of the World's existing system instances.
Declaration
public void DestroySystemManaged(ComponentSystemBase system)
Parameters
Type | Name | Description |
---|---|---|
ComponentSystemBase | system | The system to destroy. Must be an existing instance in this World. |
Remarks
Important: This function creates a sync point, which means that the EntityManager waits for all currently running Jobs to complete before destroying the system, and no additional Jobs can start before the function is finished. A sync point can cause a drop in performance because the ECS framework may not be able to make use of the processing power of all available cores.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if any of the World's systems are currently executing. |