- Home /
Networked level loading
I'm trying to follow the example on networked level loading from http://unity3d.com/support/documentation/Components/net-NetworkLevelLoad.html and I'm running into an issue. I am sending the RPC call after loading the game level, but my Spawn object's Instantiate script never receives the OnNetworkLoadedLevel call on the other side.
The only real difference I can see between my code and the example is that I deleted the 2 yields because they don't seem to serve any function. Am I mistaken there?
Is there a better place to kick off the creation of players in a networked game?
The yields are kind of vital. They introduce a delay, so that it makes sure that the RPC has been received everywhere!
Yield is a pretty random way to ensure RPC delivery... it could be seconds before a crappy connection gets the packet. I guess the example is just not useful code?
Not really useful, no. Try using LoadLevelAsync
and yield until that's finished.
Your answer
Follow this Question
Related Questions
Unity3d Network - Cant See Connected Players 3 Answers
Buffer RPC until I have the right scene loaded 0 Answers
client to client ping - NAT punchthrough 1 Answer
RPC Call doesnt get called 2 Answers