docs.unity3d.com
    Show / Hide Table of Contents

    Struct GhostPrefabCreation.Config

    Configuration used to create a ghost prefab.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    public struct Config

    Fields

    DefaultGhostMode

    The default mode for this ghost. This controls what the prefab will be instantiated as when the client spawns it, but the default can be overridden and the mode can be changed at runtime.

    Declaration
    public GhostMode DefaultGhostMode
    Field Value
    Type Description
    GhostMode

    Importance

    Higher importance means the ghost will be sent more frequently if there is not enough bandwidth to send everything.

    Declaration
    public int Importance
    Field Value
    Type Description
    Int32

    Name

    The name of the ghost. When creating prefabs from code this is used to create a unique ghost type.

    Declaration
    public FixedString64Bytes Name
    Field Value
    Type Description
    FixedString64Bytes

    OptimizationMode

    Dynamic optimization mode uses multiple baselines to make sure data is always small. Static optimization mode will compress slightly less when there are changes, but it will have zero cost when there are no changes.

    Declaration
    public GhostOptimizationMode OptimizationMode
    Field Value
    Type Description
    GhostOptimizationMode

    SupportedGhostModes

    The ghost modes this prefab can be instantiated as. If for example set the Interpolated it is not possible to use this prefab for prediction.

    Declaration
    public GhostModeMask SupportedGhostModes
    Field Value
    Type Description
    GhostModeMask

    UsePreSerialization

    Enable pre-serialization for this ghost. Pre-serialization makes it possible to share part of the serialization cpu cost between connections, but it also has that cost when the ghost is not sent.

    Declaration
    public bool UsePreSerialization
    Field Value
    Type Description
    Boolean
    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