Class ClientPopulatePrespawnedGhostsSystem
ClientPopulatePrespawnedGhostsSystem systems is responsible for assign to the pre-spawned ghosts their ghost ids and adding them to the spawned ghosts maps. It relies on the previous initializations step to determine the subscene subset to process.
Clients expect to receive as part ot the protocol:
- subscene hash and baseline hash for validation
- the ghost id range for each subscene.
THE PRESPAWN SUBSCENE SYNC PROTOCOL
Client> will eventually receive the subscene data and will store it into the PrespawnHashElement collection Client> (in parallel, before or after) will serialize the prespawn baseline when a new scene is loaded Client> should validate that:
- the prespawn scenes are present on the server.
- that count, subscene hash and baseline hash match the one on the server Client> will assign the ghost ids to the prespawns Client> must notify the server what scene sections has been loaded and initialized.
Inherited Members
Namespace: Unity.NetCode
Syntax
[UpdateInWorld(TargetWorld.Client)]
[UpdateInGroup(typeof(PrespawnGhostSystemGroup))]
[UpdateAfter(typeof(PrespawnGhostInitializationSystem))]
public class ClientPopulatePrespawnedGhostsSystem : SystemBase
Methods
OnCreate()
Declaration
protected override void OnCreate()
Overrides
OnUpdate()
Declaration
protected override void OnUpdate()