docs.unity.cn
    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.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    [InternalBufferCapacity(950)]
    public struct PredictedGhostSpawn : IBufferElementData

    Fields

    entity

    The entitis that has been spawned

    Declaration
    public Entity entity
    Field Value
    Type Description
    Entity

    ghostType

    The index inside the GhostCollectionPrefab that identify the type of ghost to be spawned.

    Declaration
    public int ghostType
    Field Value
    Type Description
    Int32

    spawnTick

    The server tick the entity has been spawned.

    Declaration
    public NetworkTick spawnTick
    Field Value
    Type Description
    NetworkTick
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023