I've seen this question asked in a couple of places, and the answer usually seems to be "Make sure to use PhotonNetwork.LoadLevel" and "PhotonNetwork.AutomaticallySyncScene = true" as well as using Photon Network to instantiate. I am doing all of these however, I still cannot see players in the same scene (however objects instantiated after the client joins are visible).
The problem: As stated above, when multiple users are in a room, only the master client can see other players and instantiated objects. When the other clients finish loading, they can see the world and newly instantiated objects, but no players or old instantiated objects.
The process: When a player presses the "find game" button, they trigger
PhotonNetwork.JoinRandomRoom();
and attempt to join a room or create one. A 10 second timer begins. A number of players can join during this 10 second period. After 10 seconds, the room is locked PhotonNetwork.CurrentRoom.IsOpen = false;
and the game is loaded PhotonNetwork.LoadLevel(1);
. The object persists, and if it's the master client, it spawns enough AIs to equal 10 (everything is instantiated using PhotonNetwork.Instantiate
. In addition to spawning AIs, a number of guns are spawned by the MC. When the client's level finishes loading (usually a few seconds later), none of those objects or AIs are visible to the client. However, the objects they spawn (bullets, lasers, etc) appear to the client. The master client can see everything and everyone, including the newly joined clients, leading me to believe that there's some problem with joining players fetching the buffered players and objects created before they joined.
Are there any common mistakes that could lead to something like this?
I am using PUN V2 which I recently switched to, unsure if there's a problem related to that or not. I am also deploying to WebGL