docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct PredictedGhostSpawn

    Added to a PredictedGhostSpawnList singleton entity. Contains a transient list of ghosts that should be pre-spawned. Expects to be handled during the GhostSpawnClassificationSystem step. InternalBufferCapacity allocated to almost max out chunk memory. In practice, this capacity just needs to hold the maximum number of client-authored ghost entities per frame, which is typically in the range 0 - 1.

    Implements
    IBufferElementData
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.NetCode
    Assembly: Unity.NetCode.dll
    Syntax
    [InternalBufferCapacity(0)]
    public struct PredictedGhostSpawn : IBufferElementData

    Fields

    entity

    The Entity that has been spawned.

    Declaration
    public Entity entity
    Field Value
    Type Description
    Entity

    ghostType

    The index of the ghost type in the GhostCollectionPrefab collection. Used to classify the ghost (GhostSpawnClassificationSystem).

    Declaration
    public int ghostType
    Field Value
    Type Description
    int

    spawnTick

    The server tick the entity has been spawned.

    Declaration
    public NetworkTick spawnTick
    Field Value
    Type Description
    NetworkTick

    Methods

    ToFixedString()

    Helper.

    Declaration
    public FixedString128Bytes ToFixedString()
    Returns
    Type Description
    FixedString128Bytes

    Formatted informational string.

    Implements

    Unity.Entities.IBufferElementData
    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)