RemoveFromRoomCache Question

Options
You can open and close doors in my game. Anyone who joins late only cares about the latest "state" of the door (open, closed, etc.). I'm using RaiseEvent for each interaction.

I can accomplish this by raising the event with RemoveFromRoomCache as the caching option and then on the following line raising the same event with AddToRoomCacheGlobal. However, isn't this doubling the amount of network messages I am sending?

Is there a better approach to this issue? Maybe the RemoveFromRoomCache can be run locally once you receive the event, rather than sending another message to everyone telling them to remove it? I would appreciate any help.

Answers

  • Nobrega
    Nobrega
    edited September 2017
    Options
    I found this in the PhotonNetwork.cs class:
    When using cachingOption removeFromRoomCache, the eventCode and content are actually not sent but used as filter.


    Does this mean that the event code and content are not sent over the network, but the removal of the event from the room cache is? My main concern is reducing the network traffic and avoiding the message limitations. I don't want to send two messages over the network everytime I raise an event just to remove any previous/duplicate events. I feel like there should be a way to do this "locally".