docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Enum GhostMode

    The Current Ghost Mode of a Ghost, on any given client. Denotes replication and prediction rules.

    Stores the `Supported Ghost Mode` by a ghost at authoring time.

    - Interpolated:

    - Predicted: Predicted Ghosts are predicted by the clients. I.e. Their Simulate component is enabled during the execution of the PredictedSimulationSystemGroup, and Systems in the PredictedSimulationSystemGroup will execute on their entities. They'll also have the PredictedGhost.This prediction is both expensive and non-authoritative, however, it does allow predicted Ghosts to interact with physics more accurately, and it does align their timeline with the current client.Miss-predictions are handled by GhostPredictionSmoothing (example: DefaultTranslationSmoothingAction). From a timeline POV: Interpolated ghosts are behind the current client, and the server.

    - All: Predicted Ghosts are predicted by the clients. I.e. Their Simulate component is enabled during the execution of the PredictedSimulationSystemGroup, and Systems in the PredictedSimulationSystemGroup will execute on their entities. They'll also have the PredictedGhost.This prediction is both expensive and non-authoritative, however, it does allow predicted Ghosts to interact with physics more accurately, and it does align their timeline with the current client.Miss-predictions are handled by GhostPredictionSmoothing (example: DefaultTranslationSmoothingAction). From a timeline POV: Interpolated ghosts are behind the current client, and the server.

    Namespace: Unity.NetCode
    Assembly: Unity.NetCode.dll
    Syntax
    public enum GhostMode

    Fields

    Name Description
    Interpolated

    Interpolated Ghosts are lightweight, as they perform no simulation on the client. Instead, their values are interpolated (via SmoothingAction rules) from the latest few processed snapshots. From a timeline POV: Interpolated ghosts are behind the server.

    OwnerPredicted

    The ghost will be Predicted by the Ghost Owner (set via GhostOwner) and Interpolated by every other client.

    Predicted

    Predicted Ghosts are predicted by the clients. I.e. Their Simulate component is enabled during the execution of the PredictedSimulationSystemGroup, and Systems in the PredictedSimulationSystemGroup will execute on their entities. They'll also have the PredictedGhost.

    This prediction is both expensive and non-authoritative, however, it does allow predicted Ghosts to interact with physics more accurately, and it does align their timeline with the current client.

    Miss-predictions are handled by GhostPredictionSmoothing (example: DefaultTranslationSmoothingAction). From a timeline POV: Interpolated ghosts are behind the current client, and the server.

    In This Article
    Back to top
    Copyright © 2025 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)