Hot-Join a multiplayer game session/party

Hi,

I have just started using PUN and have a question regarding player prefab spawning.

My question is, instead of spawning a new player prefab when a player connects, can I tell PUN "hey, I already have a player object in the scene, don't spawn a new one, just use the existing player object", then the local player object is synced with the server and the rest of the clients.

I don't know if I came across clear enough, but basically what I want is:

Player 1 starts the game in offline/single player mode with player object already in the scene ->
starts a multiplayer session/creates a party, existing player object in the scene is assigned as "local player" and synced with the server.

Player 2 starts the game in offline/single player mode with player object already in the scene->
joins the multiplayer session/party, existing player object in the scene is assigned as "local player" and synced with the server and rest of the clients.

How can I achieve this using PUN?

Thanks!

Best Answer

Answers