Failed to network remove gameobject

Options
Hi I have looked all over and haven't been able to figure this out. I am instantiating objects with PhotonNetwork.InstatiateSceneObject. The object the script is attached to has a photon view and is owned by the scene. In the script I check if (photonview.isSceneView). My game is a drop in and out kind of game. When I start the game in the editor, and then on my phone, everything runs fine. If I then exit playing on my computer and come back in, I get errors saying "Failed to instantiate Gameobject. Client is neither the owner or Master Client". I thought I read when the master client leaves, it gets transferred automatically to a new player. So I don't know why it would be trying to instantiate from the newest player that joined when I specifically have if(isSceneView). Any help would be appreciated. Thanks! :smile:

Best Answer

  • jobo22
    jobo22
    Answer ✓
    Options
    Hi I got the errors to go away. I had to check if(photonView.isSceneView && photonView.IsMine). Thanks for the reply though!

Answers

  • jobo22
    jobo22
    edited June 2017
    Options
    It also says the a similar thing with destroying. Failed to 'network-remove' Gameobject. Client is neither owner or Master Client. I don't know what to do with scene objects. Objects created and destroyed by players work great. Even with these errors, it still seems to instantiate and destroy just fine, so I don't know why it's showing them.
  • Kurtav
    Kurtav ✭✭
    edited June 2017
    Options
    If I then exit playing on my computer and come back in
    Please describe this process in more detail. And scripts where you create scene objects(PhotonNetwork.InstatiateSceneObject)
  • jobo22
    jobo22
    Answer ✓
    Options
    Hi I got the errors to go away. I had to check if(photonView.isSceneView && photonView.IsMine). Thanks for the reply though!