[Photon] Sync pre-spawned objects.

Hello guys.

I have a problem with my players.

When a player clicks “Join Room” it creates/joins a random room , then it loads the “Game” scene and finally after 1.5 secs of delay, spawns the player prefab.

The problem is that, when a second player comes in , he cant see the other player (the first one).

How do I synk the new game to see the other player?

See you!

-------------------------EDIT----------------------
I am using a NetworkManager (with dont destroy on load) to manage network stuff like creating/joining/spawning the player.
Do I have to add a PhotonView component to it?

------------SOLVED-------------
I had to use PhotonNetwork.LoadLevel()

1 Like

You use NetworkManager? This is not related to Photon :slight_smile:
PhotonNetwork.LoadLevel() helps in this case, because it saved the room’s level in a Custom Property and those can be accessed when joining, before the Instantiate calls get done. So it first loads the room’s scene and then continues with the network messages (instantiate, etc).

Glad you found it and updated us! :slight_smile:

With NetworkManager I mean a custom class :stuck_out_tongue:

See you!