Struct GhostReceiveSystem
System present only in clients worlds, receive and decode the ghost snapshosts sent by the server.
When a new snapshost is received, the system will start decoding the packet protocol by extracting:
-the list of ghost that need to despawned
-for each serialized ghost, it delta-compressed or uncompressed state
The system will schedule spawning and despawning ghosts requests, by using the GhostSpawnBuffer, and GhostDespawnQueues respectively.
When a new state snapshot is received for a ghost that has been already spawned (see SpawnedGhostEntityMap), the state is deserialized and added to the entity SnapshotDataBuffer history buffer.
The received snapshot are recorded into the NetworkSnapshotAck, that will then used to send back to the server, as part of the command stream, the latest received snapshot by the client.
Implements
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
[WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation|WorldSystemFilterFlags.ThinClientSimulation, WorldSystemFilterFlags.Default)]
[UpdateInGroup(typeof(GhostSimulationSystemGroup))]
[UpdateAfter(typeof(PrespawnGhostSystemGroup))]
[UpdateAfter(typeof(GhostCollectionSystem))]
[UpdateAfter(typeof(NetDebugSystem))]
[BurstCompile]
public struct GhostReceiveSystem : ISystem, ISystemCompilerGenerated