Spawning players in multiple levels with PUN

ChristianWiele

Active member
Hi,

my multiplayer game has multiple levels, but I figured out that the SpawnManagerBase is not intended for this. If I load a new level the player on the master client is spawned, but on the client it is not spawned as the SpawnManagerBase reacts only on "OnPlayerEnteredRoom" which is not the case for the second level. What is the intended approach for using multiple levels with the PUN add-on?

Thanks, Christian
 
I can add this to my feature request list for PUN. Does PUN have any sort of callback for when a new level is loaded? I am thinking that you could tie into that.
 
I don't think there is a specific callback. It could be an option to use a custom room property for the scene and let the master client change this property upon loading a new scene. Then you could react to the OnRoomPropertiesUpdate callback.
 
Top