Struct GhostCollection
A component used to identify the singleton which owns the ghost collection lists and data. The singleton contains buffers for GhostCollectionPrefab, GhostCollectionPrefabSerializer, GhostCollectionComponentIndex and GhostComponentSerializer.State
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public struct GhostCollection : IComponentData, IQueryTypeParameter
Fields
GhostTypeToColletionIndex
The index in the Ghost
Declaration
public NativeHashMap<GhostType, int>.ReadOnly GhostTypeToColletionIndex
Field Value
Type | Description |
---|---|
Native |
IsInGame
Flag set when there is at least one Network
Declaration
public bool IsInGame
Field Value
Type | Description |
---|---|
bool |
NumLoadedPrefabs
The number of prefabs that have been loaded into the Ghost
The server reports (to the client) the list of loaded prefabs (with their see Ghost
Clients report (to the server) the number of loaded prefabs, as part of the command protocol.
When the client receives a ghost snapshot, the ghost prefab list is processed, and the Ghost
The client does not need to have loaded ALL prefab types in the Ghost
Declaration
public int NumLoadedPrefabs
Field Value
Type | Description |
---|---|
int |
PendingGhostPrefabAssignment
The index in the Ghost
Declaration
public NativeHashMap<GhostType, int> PendingGhostPrefabAssignment
Field Value
Type | Description |
---|---|
Native |
Remarks
Should be used only by the client. For server the map is always empty. It also contains a special key for the default(GhostType) that indicate if the list has been changed since the last time has been processed.