Keep Player GameObject state during room switch.

Options
Hello, here is my problem :

In my game, there's the "City" wich is a Scene in a Global and public Room in wich every player gets connected when game starts, and there is the "player House" wich is private and specific to player.

Knowing that, how can I make the transition between The City and the player house (switching rooms) without destroying player gameobject and losing all info about it ? (Imagine I won an item in the City, i will lose it if I reinstanciate the player when going to the House room)

Comments

  • Infitek
    Options
    Nevermind, I solved the problem by saving the player into in JSON format on an online server.
    This way I save the player before leaving the room and I load it just after the instanciation in the new room