RaiseEvent Doesn't Work In Offline Mode

Options
I wanted to use RaiseEvents for a persistent manager object where I can't use a PhotonView, but they don't seem to work in Offline mode.

Any chance we could get this working? ;)

Comments

  • [Deleted User]
    Options
    Hi @nindim,

    no, RaiseEvent(...) won't work in offline mode. What you want to do instead is to add a condition that checks your connection status to Photon and continues processing something based on this result, e.g.:
    if (!PhotonNetwork.offlineMode)
    {
        PhotonNetwork.RaiseEvent(...);
    }
    else
    {
        // Do something
    }
    You can read about offlineMode property here.
  • czk
    Options
    I found another solution to this problem. You can just invoke event on the client if you are in offline mode:

    if (!IsConnectedWithPlayer()) { PhotonNetwork.OnEventCall(eventCode, eventContent, 0); }