offlineMode deletes PhotonNetwork.Instantiate objects

Options
I'm running into strange behavior with using PhotonNetwork.offlineMode = true.

Here is what is going on:
  • Player selects a single player mode
  • PhotonNetwork.offlineMode set to true
  • Create a room
  • OnCreatedRoom triggered
  • Load game level
  • Setup scene in Awake of game level
  • Objects created using PhotonNetwork.Instantiate
  • OnDisconnectedFromPhoton fired
  • PhotonNetwork.Instantiate objects deleted

Why would OnDisconnectedFromPhoton fire when I'm in offlineMode? And why would OnDisconnectedFromPhoton in offlineMode remove PhotonNetwork.Instantiated objects?

I've got a work around to just recreate the objects, but would prefer a less clunky fix.

Comments

  • I think I fixed it by disconnecting from photon before going into offlineMode. I found it by testing on an iOS device and it traced out a warning in the debug log that you must disconnect before going into offlineMode, but inside Unity there isn't any warning or error.
  • Tobias
    Options
    Ah, thanks for updating us. That would have been hard to find for us.
    We will take a look and add a Error to console.