docs.unity3d.com
    Show / Hide Table of Contents

    Enum GhostModeMask

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

    - Interpolated:

    - Predicted:

    - All:

    Namespace: Unity.NetCode
    Syntax
    public enum GhostModeMask

    Fields

    Name Description Value
    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.


    1
    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.


    2
    All

    Supports both modes, and thus can be changed at runtime (called "runtime prediction switching" via GhostPredictionSwitchingQueues). Disables mode-specific optimizations (via GhostSendType).


    3
    In This Article
    • Fields
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023