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
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> |