Offline mode and RPCs - not entirely expected behaviour

According to the documentation, RPCs "work as expected" when offlineMode = true.

I have found that in my game, when in offlineMode, PhotonNetwork.room = null, which is intended behaviour, but this causes any RPCs to simply not execute, and also print the warning message "Cannot send RPCs in Lobby! RPC dropped."

This wouldn't be much of a problem (although the warning message spam is annoying), but there are a number of places in my code where i send an RPC to PhotonTargets.All (which of course includes the client who sends the RPC, i.e. the "client" playing in offlineMode) So, this method doesn't execute locally and the game breaks.

If this is the intended behaviour then fair enough, I can code around this, it's just I would have expected that an RPC in offlineMode with PhotonTargets.All as the recievers would get called locally.

Comments

  • You need to join a room, even in offline mode. In the lobby (where you are before you join a room), you can't call RPCs.
    That's most likely the reason why your RPCs fail this way.
  • Joining a room in offline mode makes no sense whatsoever.... change this