Photon Views Destroyed on MasteClient Disconnect Even After Transfer

Options
I have a scene with two network players. Both network players have a "team base" where ownership is set via "TransferOwner" at runtime, on game creation. There is also an AI team which is owned by the Master client on game creation.

Say, player 1 is master client. When player 1 decides to leave the game, I transfer ownership of the AI bases to player 2 when they are set to master client (after player 1 leaves). However, as soon as player 1 disconnects (or stops play in the Unity Editor) the AI bases are also destroyed (even though they are owned by player 2).

I am not destroying the bases manually (with PhotonNetwork.Destroy(), for instance). Nor do I destroy with the standard unity Destroy() method. They are simply being destroyed when player 1 disconnects. I was under the impression that when photon views are owned by "player 2" then they would _not_ be destroyed when "player 1" disconnects. Am I missing something?

Comments

  • BigGameCo
    Options
    Is the AI base instantiated as a scene object?
  • ecliptec
    Options
    BigGameCo wrote: »
    Is the AI base instantiated as a scene object?

    Thanks! I just came on to make a post. Indeed, I had used Photon.Instantiate() instead of Photon.InstantiateSceneObject(). Note-to-self: RTFM! :smile:
  • BigGameCo
    Options
    glad you got it sorted.