Instantiated prefab destroyed on disconnect.

Options
When player disconnected from room, all of objects instantiated by that player destroed immediately at all clients, even at master. Do I need to write server-side code, able to check connected players trying to instantiate something and instantiate those objects by itself?

Thanks for any help.

P. S. - sorry for my english, it's not my native language.

Comments

  • The master client can instantiate scene objects with PhotonNetwork.InstantiateSceneObject. If you need a players objects to persist after they have disconnected you could have the players send an rpc to the master client that instantiates the objects that way (as scene objects) instead of instantiating them directly themselves. The scene objects are owned by the master client, and if the master client leaves, the ownership is transferred to the new master client.
  • CyXoB
    Options
    I see now. I was using just instantiating w/o SceneObject. Thank you!