Class CustomPhysicsSystemGroup
This abstract class can be used to create a system group for a custom physics world. To create a custom physics group, derive from this class and implement empty constructor which calls one of two constructors of this class, and potentially implement some of the other virtual functions.
Inheritance
Inherited Members
Namespace: Unity.Physics.Systems
Assembly: solution.dll
Syntax
public abstract class CustomPhysicsSystemGroup : CustomPhysicsSystemGroupBase
Remarks
If class that derives CustomPhysicsSystemGroup doesn't need the Simulation to be recreated on each OnStartRunning then it should override OnStartRunning and guard instantiation of new Simulation so it happens only once. It also has to override OnStopRunning and move disposing of simulation to it's own Dispose method.
Constructors
Name | Description |
---|---|
CustomPhysicsSystemGroup(uint, bool) | Constructor. Your subclass needs to implement an empty constructor which is calling this one to properly set up the world index. |
Methods
Name | Description |
---|---|
PostGroupUpdateCallback() | Called after the systems in this group are updated. It is useful in cases of needing to restore system state (such as NativeArrays, NativeLists etc), after it is ran in a custom group. If overriding this method, make sure to call base.PostGroupUpdateCallback(). |
PreGroupUpdateCallback() | Called before the systems in this group are updated. It is useful in cases of needing to store system state (such as NativeArrays, NativeLists etc), before it is ran in a custom group. If overriding this method, make sure to call base.PreGroupUpdateCallback(). |