Pausing¶
After you’ve joined a match room, every time a new network object is created by some other client, its replica will be automatically instantiated in the scene. However, sometimes you might want to disable this behaviour. For example, you may want to wait until all clients join the game and then instantiate all their characters at the same time.
There is a property on the StrixNetwork
singleton called autoInstantiateReplica
,
that is enabled by default.
If you turn it off, new replicas won’t be instantiated in the scene,
even though the information about them will still be received and stored.
When you are ready to instantiate the objects, call RespawnReplicas
.
Note
Just turning autoInstantiateReplica
back on won’t respawn the replicas. It will only affect the creation of new ones.
Note
autoInstantiateReplica
is not automatically reset when RespawnReplicas
is called.
You need to turn it on manually.