Messaging to Server (Callbacks and Events)

Options
We are using self hosted Photon Server and Photon Server Plugins with PUN. We are using PhotonNetwork.JoinRandomRoom and other PhotonNetwork commands to handle networking.

For Server Plugins callbacks to work the client needs to call for example OpCreateRoom, OpJoinOrCreateRoom or OpJoinRoom so that the server could send data to clients with BroadcastEvent. However, the basic PUN plugin doesn't provide these. To my knowledge the methods are in LoadBalancingClient, which is not included in PUN.

How can I implement LoadBalancingClient or is there another way to call OpJoinRoom and other operation methods? The basic PUN and Photon Server behaviours are enough for our game for now, so I wouldn't want to implement anything major if that can be avoided. We only need the Plugin to pass JSON data to Unity clients.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited March 2017
    Options
    Hi @Iliwa,

    Thank you for choosing Photon!

    PUN contains all LoadBalancing operations. The naming is different between PUN and the other LoadBalancing/Photon Realtime C#/.Net SDKs however. The "Op" prefix is removed from PUN.

    Also PUN relies on BroadcastEvent heavily under the hood for RPCs and network instantiation and PhotonView serialization.
    The basic PUN and Photon Server behaviours are enough for our game for now

    You can use Photon Realtime Unity SDK if you do not need PUN specific features.
  • Iliwa
    Options
    I'll try that. I was so fixed in searching for the "Op" prefixed commands, that I guess I missed that.
    You can use Photon Realtime Unity SDK if you do not need PUN specific features.

    We'll probably need PUN features in the future, but I'll keep that in mind. Thank you!