Enum PhysicGroupRunMode
When netcode steps physics, for both Unity Physics (the PhysicsSystemGroup) and GameObject physics (the default physics scene).
Namespace: Unity.Netcode
Assembly: Unity.NetCode.dll
Syntax
[MovedFrom(true, "Unity.NetCode", "Unity.NetCode.Physics", null)]
public enum PhysicGroupRunMode
Remarks
Unity Physics steps inside the PredictedFixedStepSimulationSystemGroup, on every prediction tick. On clients, the prediction loop runs once the client has a valid server tick.
For GameObject physics, every value except UserControlled means that, while any client or server world exists, netcode sets Physics.simulationMode to SimulationMode.Script and steps the default physics scene every full tick, whether or not any rigidbodies exist. It steps inside the prediction loop, so that rollback re-simulates predicted GhostRigidbody ghosts. On clients, when the prediction loop doesn't run (for example, while connecting), netcode steps it at the simulation tick rate instead. Netcode restores the previous Physics.simulationMode once the last client or server world is destroyed.
Fields
| Name | Description |
|---|---|
| AlwaysRun | The default. Physics steps on every prediction tick, whether or not any physics entities exist. |
| InheritOrAuto | On a |
| LagCompensationEnabledOrAnyPhysicsEntities | Deprecated, now the same as AlwaysRun. Formerly a more relaxed option: the |
| LagCompensationEnabledOrKinematicGhosts | Deprecated, now the same as AlwaysRun. Formerly the default: the |
| UserControlled | Netcode never steps physics. The Unity Physics systems stay in the |