Struct GhostDespawnSystem
Present only in client worlds. Responsible for destroying spawned ghosts when a despawn request/command is received from the server.
Clients are not responsible for destroying ghost entities (and thus should never). The server is responsible for notifying the client about which ghosts should be destroyed (as part of the snapshot protocol).
When a despawn command is received, the ghost entity is queued into a despawn queue. Two distinct despawn queues exist: one for interpolated, and one for the predicted ghosts.
The above distinction is necessary because interpolated ghosts timeline (Interpolation
Predicted entities, on the other hand, can be despawned only when the current Server
Implements
Inherited Members
Namespace: Unity.NetCode
Assembly: solution.dll
Syntax
[BurstCompile]
[RequireMatchingQueriesForUpdate]
[UpdateInGroup(typeof(GhostSimulationSystemGroup))]
[WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation|WorldSystemFilterFlags.ThinClientSimulation, WorldSystemFilterFlags.Default)]
public struct GhostDespawnSystem : ISystem