docs.unity.cn
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.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.NetCode
    Assembly: solution.dll
    Syntax
    [InternalBufferCapacity(950)]
    public struct PredictedGhostSpawn : IBufferElementData

    Fields

    Name Description
    entity

    The Entity that has been spawned.

    ghostType

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

    spawnTick

    The server tick the entity has been spawned.

    In This Article
    Back to top
    Copyright © 2023 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)