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
Assembly: Unity.NetCode.dll
Syntax
public struct GhostRelevancy : IComponentData, IQueryTypeParameter
Remarks
Use GhostRelevancy to avoid replicating entities that the player can neither see, nor interact with.
Fields
DefaultRelevancyQuery
Use this query to specify the default per-component type rules about which ghosts should be relevant.
Note, however, that this filter is overridden by Ghost
- All ghosts with MyComponentA + the single ghostWithComponentB will be relevant Mode = SetIsIrrelevant, DefaultRelevancyQuery = Any<MyComponentA>, GhostRelevancySet = ghostWithComponentA
- All ghosts with MyComponentA will be relevant, except the single ghostWithComponentA
Declaration
public EntityQuery DefaultRelevancyQuery
Field Value
Type | Description |
---|---|
Entity |
Remarks
Since this is translating to a Entity
GhostRelevancyMode
Specify if the ghosts present in the Ghost
Declaration
public GhostRelevancyMode GhostRelevancyMode
Field Value
Type | Description |
---|---|
Ghost |
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 Ghost
Declaration
public readonly NativeParallelHashMap<RelevantGhostForConnection, int> GhostRelevancySet
Field Value
Type | Description |
---|---|
Native |