Receive Data From Server To a Single Client Using onOperationResponse

Hi all, I'm working on a project with the help of the PhotonDemoParticle Project. I've figured out how to call opRaiseEvent from a client to send data to the server to propagate to all clients and receive in customEventAction. It works no problem. I've looked through the Photon Server SDK and

What I'm trying to do now is call opCustom directly, from the client. The reason for this is that most of the time this operation will be handled by the server and not need to send anything back to the client and doesn't need to be replicated. This is good because these operations won't be run through the game thread? But for the case that there does need to be data sent back (to only the client that requested), I tried using SendOperationResponse (from the server) and put my data in the Parameters of the OperationResponse but couldn't figure out how/where to extract the data back on the client. Anybody have an example of how to implement this? Or maybe I'm doing it wrong?

Appreciate the help!

Comments

  • Hi, @Matt819

    Without an understanding of what you are doing, it is impossible to say what you do right or wrong. or whether a message will pass through a game thread or not.

    if you like to send something to the client as a response to his operation request, it is perfect to use SendOperationResponse. On the client, you will get it GameLogic.OnOperationResponse call. you need to update this method to handle the response to your operation

    best,
    ilya