Additional characters don't spawn after level load?

gekido

Member
Been fighting with this for a bit now - I have multiple scenes set up with UCC + Pun, everything spawns and runs fine on the first level, but when I try to load the second level only the characters on the master client instance spawn properly, and I get a bunch of 'unknown photon view' errors' on the other clients?

I can't see what would be different from one scene to the next, I can see that the players are all in the same photon room still, the 2 scenes are completely independent as far as I can tell, they have the full UCC game + pungame setup and are using the SingleCharacter spawner script to spawn the characters, but...it's not working.

I'm simply doing a PhotonNetwork.LoadLevel() call to jump from one scene to the next, not sure where things are going wrong.

Any ideas?
 
(re-posting from discord):

I think I see what the issue is. SpawnPlayer() (in SpawnManagerBase) is only called in Start() for the master client and OnPlayerEnteredRoom() when other players join in. Since the players are already IN the room when the new level loads, they don't spawn. Sigh. So it looks like this use case isn't handled at all by the PUN Add-on, will have to jerry rig something up
 
Thanks for looking into it. I'll add an example to the next update of the PUN add-on to ensure this case is covered.
 
Top