Quantcast
Channel: Photon Server — Photon Engine
Viewing all articles
Browse latest Browse all 1557

Receive Data From Server To a Single Client Using onOperationResponse

$
0
0
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!

Viewing all articles
Browse latest Browse all 1557

Trending Articles