Struct ClientPopulatePrespawnedGhostsSystem
Responsible for assigning a unique ghost
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
[WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation|WorldSystemFilterFlags.ThinClientSimulation, WorldSystemFilterFlags.Default)]
[UpdateInGroup(typeof(PrespawnGhostSystemGroup))]
[UpdateAfter(typeof(PrespawnGhostInitializationSystem))]
[BurstCompile]
public struct ClientPopulatePrespawnedGhostsSystem : ISystem, ISystemCompilerGenerated
Remarks
Clients expect to receive the following as part ot the protocol:
- The subscene hash and baseline hash for validation.
- The ghost id range for each subscene.
### The Full Prespawn Subscene Sync Protocol
The Client will eventually receive the subscene data and will store it into the `PrespawnSceneLoaded` collection. The Client (in parallel, before or after) will serialize the prespawn baseline when a new scene is loaded. The Client should validate that:
- The prespawn scenes are present on the server.
- That the prespawn ghost count, subscene hash and baseline hash match the one on the server.
The Client will assign the ghost ids to the prespawns. The Client must notify the server what scene sections has been loaded and initialized.