Snychronization direction

Options
Is there any way, to communicate with photon view on owner machine, from client machine (same photon view) without using rpc?
We are using a lot of classes, that are not inherited from MonoBehaviour, so we can't just use RPC (Photon maps only rpc's, that are on objects inherited from MonoBehaviour). Right now we have our solution, for call synchronization, that is based on "OnPhotonSerializeView" (we call it from our classes that are "on top"), so it is one direction call synchronization.
How to communicate with owner, from classes, thate are not inherited from MonoBehaviour?

Comments

  • Hi @ostryjagoda,

    Is there any way, to communicate with photon view on owner machine, from client machine (same photon view) without using rpc?


    There is also PhotonNetwork.RaiseEvent which you can use for communication. You can read about RaiseEvent here.

    But I honestly don't see the problem: if your current solution is to use OnPhotonSerializeView, then you could basically also use RPCs the same way or am I missing something?
  • ostryjagoda
    Options
    As I say "[...]"OnPhotonSerializeView" (we call it from our classes that are "on top")[...]".
    We are implementing IPunObservable in classes inherited not from MonoBehaviour, but PUN isn't call OnPhotonSerializeView on this class'es (because it can call it only on something inherited from MonoBehaviour).
    We are calling that method on own hand (PUN -> ObservedMonoBehaviour.OnPhotonSerializeView() -> Tree structure of classes that are not inherited from MB).
    Calling method in down direction is easy, if you don't have to call it on specified instance (which is necessary to handle RPC).