- Home /
Joining a Running Server (Game) and Waiting for Game State Data. How?
I'll try and keep this brief and clear.
I currently have a game with continuous play servers. When a client joins a server, he should have the current state of game before he can interact (or run some setup code). This state involves many networkView.RPC with RPCMode.AllBuffered and Network.Instantiate calls (as well as some calls to Network.RemoveRPCs).
As the title says, how do I wait to make sure I've received all those calls?
Answer by bdjnk · May 19, 2013 at 06:46 AM
Here's how I got it working:
After the last RPC or Network.Instantiate necessary for anyone joining the server to have received, Network.Instantiate a final GameObject from a Prefab. This Prefab should have an attached script which uses its Start() to run the player setup code and enable interaction.