#What is the best way to move a player with visual components to the next scene from the lobby using

3 messages · Page 1 of 1 (latest)

mossy ember
#

Hello,
I'm getting confused here about what the best practice is when using Fizzy Steamworks with Mirror. In the lobby scene, I have a player component which is an empty game object. On this object, I invoke the "ready" callback and get the name callback, fulfilling the NetworkManager's requirement to have a player existing in the scene. This all works well when in the lobby scene.
But the problem is: what should I do when switching to a different scene (let's call it the "game" scene)?
Should I:

Use the existing player game objects and add the visual representation dynamically?
Or spawn new game objects that contain the visual representation of the player and use the simple game object from the menu as a component inside the new player object?

sturdy lichen
mossy ember
#

Here is the corrected version:

Thanks, but the example uses the "playerPrefab" defined in the NetworkManager and only modifies its properties.
What I meant is: can I create a completely new "player" object to replace the one defined in the NetworkManager and currently used in the lobby?
By the way, I’ve seen many open-source examples that reuse the player initially defined in the NetworkManager and simply unhide the visual components when switching scenes.
I'm not sure if that's the right approach, which is why I'm asking.