How can I send messages to Photon Server using PUN?

Options
I want to send my action to the server, and have the server handle validation, acknowledgment (that the action is valid), and broadcasting it to the clients. How do I do that using PUN?

A follow-up question is, how do I broadcast messages to the clients from the server?

Comments

  • chvetsov
    Options
    please follow all tutorials first

    best
    ilya
  • I've read through this tutorial. But it doesn't use Photon Server, and it doesn't give an example on how to send messages to server. It only shows how to send messages to other clients.
  • After some digging, I found that I can send messages from client to server using:
    PhotonNetwork.networkingPeer.OpCustom()
  • chvetsov
    Options
    all operations are send through server. there is not direct communication in PUN
  • @chvetsov That is not the point though. I don't want to send my messages to other clients. I want to send it to the server.
  • chvetsov
    Options
    as i said you always send operations to server and server decides what to do. what to do depends on operation and flags of operation
  • 0bytedna
    Options
    @chvetsov Isn't there any demo made in Unity that handles validation, acknowledgments, etc. It would be great starting point for beginners.
  • chvetsov
    Options
    hi, 0bytedna
    > handles validation, acknowledgments
    i'm not sure what do you mean

    best,
    ilya