Network.Instantiate after loading level?

I need to instantiate a player right after the level was loaded (all trought a network).

This is what I’m doing:

  1. When the player creates the server, he “network loads level”.
    After the level was loaded, the spawn script runs the Network.Instantiate function inside the Start() function.

  2. If a player connects to a server, the Network.Instantiate is executed inside the OnPlayerConnected().

Alright, but this method doesn’t seems to be very smart and very vulnerable.

How can I instantiate a player after some level was loaded?

Use OnLevelWasLoaded as the moment to instantiate your player.