docs.unity.cn
    Show / Hide Table of Contents

    Struct GhostRelevancy

    Singleton entity present on the server. Every frame, collect the set of ghosts that should be (or should not be) replicated to a given client.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    public struct GhostRelevancy : IComponentData, IQueryTypeParameter
    Remarks

    Use GhostRelevancy to avoid replicating entities that the player can neither see, nor interact with.

    Fields

    GhostRelevancyMode

    Specify if the ghosts present in the GhostRelevancySet should be replicated (relevant) or not replicated (irrelevant) to the the client.

    Declaration
    public GhostRelevancyMode GhostRelevancyMode
    Field Value
    Type Description
    GhostRelevancyMode

    GhostRelevancySet

    A sorted collection of (connection, ghost) pairs, that should be used to specify which ghosts, for a given connection, should be replicated (or not replicated, based on the GhostRelevancyMode) for the current simulated tick.

    Declaration
    public readonly NativeParallelHashMap<RelevantGhostForConnection, int> GhostRelevancySet
    Field Value
    Type Description
    NativeParallelHashMap<RelevantGhostForConnection, Int32>
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023