docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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 NetcodePhysicsConfig, uses PhysicsRunMode. On the NetcodeConfig, uses AlwaysRun.

    LagCompensationEnabledOrAnyPhysicsEntities

    Deprecated, now the same as AlwaysRun. Formerly a more relaxed option: the PhysicsSystemGroup only ran while entities with PhysicsVelocity or PhysicsCollider existed, or, with lag compensation enabled, only when IsFirstTimeFullyPredictingTick was true.

    LagCompensationEnabledOrKinematicGhosts

    Deprecated, now the same as AlwaysRun. Formerly the default: the PhysicsSystemGroup only ran while entities with PredictedGhost and PhysicsVelocity existed, or, with lag compensation enabled, only when IsFirstTimeFullyPredictingTick was true. Once every predicted ghost had been destroyed, the collision world went stale, and the entity and collider blob references in its last broadphase could be invalidated.

    UserControlled

    Netcode never steps physics. The Unity Physics systems stay in the FixedStepSimulationSystemGroup, and netcode never changes Physics.simulationMode.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)