Hot-Join a multiplayer game session/party
hopyou
✭
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!
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!
0
Best Answer
-
Hi @hopyou,
Thank you for choosing Photon!
This is possible yes.
Start by taking a look at "Manual Instantiation".
The object needs to have a PhotonView if you want to synchronize it using PUN's built-in features.5
Answers
-
Hi @hopyou,
Thank you for choosing Photon!
This is possible yes.
Start by taking a look at "Manual Instantiation".
The object needs to have a PhotonView if you want to synchronize it using PUN's built-in features.5