docs.unity3d.com
    Show / Hide Table of Contents

    Struct GhostSpawnBuffer

    The GhostSpawnBuffer is the data for a GhostSpawnQueueComponent singleton. It contains a list of ghosts which will be spawned by the GhostSpawnSystem at the beginning of next frame. It is populated by the GhostReceiveSystem and there needs to be a classification system updating after the GhostReceiveSystem which sets the SpawnType so the spawn system knows how to spawn the ghost. A classification system should only modify the SpawnType and PredictedSpawnEntity fields of this struct. InternalBufferCapacity allocated to almost max out chunk memory.

    Namespace: Unity.NetCode
    Syntax
    [InternalBufferCapacity(240)]
    public struct GhostSpawnBuffer : IBufferElementData

    Fields

    DataOffset

    Declaration
    public int DataOffset
    Field Value
    Type Description
    Int32

    DynamicDataSize

    The size of the initial dynamic buffers data associated with the entity.

    Declaration
    public uint DynamicDataSize
    Field Value
    Type Description
    UInt32

    GhostID

    Declaration
    public int GhostID
    Field Value
    Type Description
    Int32

    GhostType

    Declaration
    public int GhostType
    Field Value
    Type Description
    Int32

    PredictedSpawnEntity

    Declaration
    public Entity PredictedSpawnEntity
    Field Value
    Type Description
    Entity

    ServerSpawnTick

    The tick this ghost was spawned on the server. For any predicted spawning this is the tick that should match since you are interested in when the server spawned the ghost, not when the server first sent the ghost to the client. Using this also means you are not considering ghosts becoming relevant as spawning.

    Declaration
    public uint ServerSpawnTick
    Field Value
    Type Description
    UInt32

    SpawnType

    Declaration
    public GhostSpawnBuffer.Type SpawnType
    Field Value
    Type Description
    GhostSpawnBuffer.Type
    Back to top
    Terms of use
    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