Struct PredictedGhostSpawn
Added to a PredictedGhostSpawnList singleton entity. Contains a transient list of ghosts that should be pre-spawned. Expects to be handled during the GhostSpawnClassificationSystem step. InternalBufferCapacity allocated to almost max out chunk memory. In practice, this capacity just needs to hold the maximum number of client-authored ghost entities per frame, which is typically in the range 0 - 1.
Implements
IBufferElementData
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
[InternalBufferCapacity(950)]
public struct PredictedGhostSpawn : IBufferElementData
Fields
entity
The Entity that has been spawned.
Declaration
public Entity entity
Field Value
Type | Description |
---|---|
Entity |
ghostType
The index of the ghost type in the GhostCollectionPrefab collection. Used to classify the ghost (GhostSpawnClassificationSystem).
Declaration
public int ghostType
Field Value
Type | Description |
---|---|
int |
spawnTick
The server tick the entity has been spawned.
Declaration
public NetworkTick spawnTick
Field Value
Type | Description |
---|---|
NetworkTick |
Implements
Unity.Entities.IBufferElementData