docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Enum GhostOptimizationMode

    Specify if the ghost replication should be optimized for frequent (dynamic) or for infrequent (static) data changes.

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

    Fields

    Name Description
    Dynamic

    Dynamic optimization mode is the default mode. Use when you expect the Ghost to change often (i.e. every frame). It will optimize the ghost (via layered delta-compression) to have a small snapshot size per snapshot. No change-checking is performed, although delta-compression is applied aggressively.

    Static

    `Static` optimization mode is designed for ghosts that will change infrequently (i.e. rarely, or not change at all).

    In this mode the ghost is replicated to the client only when its state changes, which can bring good bandwidth savings, but it comes at the cost of additional cpu cycles to perform change-checking. As such, static optimization should be avoided for entities that frequently change their state, since it will actually increase both bandwidth (because of the extra protocol bits necessary) and cpu cost.

    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)