Method DestroySystem
DestroySystem(SystemHandle)
Destroys one of the World's existing system instances.
Declaration
public void DestroySystem(SystemHandle sysHandle)
Parameters
Type | Name | Description |
---|---|---|
SystemHandle | sysHandle | The system to destroy. Must be an existing instance in this World. |
Remarks
Important: This method 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 method 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. |
InvalidOperationException | Thrown if the system handle is invalid or does not belong to this world. |