docs.unity.cn
    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
    Syntax
    public enum GhostOptimizationMode

    Fields

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


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


    1
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023