- Home /
How does photon interact with scenes?
I'm working a multiplayer project which includes multiple scenes and photon networking.
I have 3 scenes, Menu/Room list, Difficulty Chooser and the level itself.
When a user creates a room the get to choose a difficulty and are taken to the level to play. I do this with the standard Application.loadlevel(scene number); When I have a user join a room instead of creating one, I want them to skip over the difficulty chooser scene and go right to the level to play. Again this works fine with Application.loadlevel(scene number);
However, upon entering the Level scene, the player that created the room is absent. the rest of the level seems to be the same.
Is it possible that the player who joins the room is creating a separate instance of the scene?
It is possible that the player who creates the room is in another room than you are. Add a Label to show the room name. $$anonymous$$ake sure it's the same. The clients don't interact in a "per scene" way. They just update each other on the few things that have a PhotonView on them, so loading another scene is not a problem by definition. If you instantiate a GameObject with PhotonView in your client in a room, this will make the other clients instantiate the same Prefab, no matter which level they loaded.
$$anonymous$$eep in $$anonymous$$d that loading a scene will destroy any existing GameObject. So if you spawn your character and load another scene, then that character is gone afterwards. You need to make sure you load the fitting scene before you spawn.
Your answer
![](https://koobas.hobune.stream/wayback/20220613150333im_/https://answers.unity.com/themes/thub/images/avi.jpg)