docs.unity3d.com
    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
    • 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