RaiseEvents for syncing variables

Options
I was reading you shouldn't use any photon views/RPCs for a turn based game, this may be a really dumb question but then how do I sync a variable on a gameobject's script? What is the reason to avoid RPC's and use Raise Events

Comments

  • Hi @3LXR,

    can you remember where you have read this? I'm curious, because I don't know if there actually is any reason to avoid using PhotonViews for player objects or characters in a turn based game.

    What is the reason to avoid RPC's and use Raise Events


    I think this is only important for the TurnManager, because this object should not have an attached PhotonView component. Instead it should use the RaiseEvent function and an registered OnEvent callback to deal with all turn-related messages (e.g. Start Turn, End Turn...).