Expose OnOperationResponse for Photon Cloud
Options
Hi,
any chance to expose OnOperationResponse for Photon Cloud?
I'm using custom code for OnOperationResponse() in NetworkingPeer.cs, that means on each PUN upgrade I need to merge all this code over again.
Would be great If I can set my listener when connecting to Photon Cloud server with PUN, that way I could implement the IPhotonPeerListener interface without modifiying the core Photon code.
Would be this feature possible? Or there is any way to set this listener for Photon Cloud that I'm missing?
Thanks!
any chance to expose OnOperationResponse for Photon Cloud?
I'm using custom code for OnOperationResponse() in NetworkingPeer.cs, that means on each PUN upgrade I need to merge all this code over again.
Would be great If I can set my listener when connecting to Photon Cloud server with PUN, that way I could implement the IPhotonPeerListener interface without modifiying the core Photon code.
Would be this feature possible? Or there is any way to set this listener for Photon Cloud that I'm missing?
Thanks!
0
Comments
-
Hi,
Why do you need to handle OnOperationResponse? May be this could be done with existing functionality0 -
Hi vadim,
My server is returning some user data using Photon Custom Authentication method: https://doc.photonengine.com/en/realtime/current/reference/custom-authentication
If auth success, my server send a JSON response to Photon servers with some custom parameters that I need to get in my client. That way I don't need to make an extra request to my server when user is authenticated.0 -
bump0
-
I guess by now, you just edited PUN to call your method with the returned values for Custom Auth?!
I would not implement a general callback for all operations in PUN. We put some work into hiding this layer with simpler to use callbacks. It would revert some of the simplicity we want to have for PUN.
But, we do see the usefulness of having custom values returned in Custom Auth, so we might just as well add a callback for that explicitly.
I hope you can supply us with a description of what you send. Would a callback "OnCustomAuth" be fine with the Dictionary of the operation return values?0 -
Hi Tobias,
A callback "OnCustomAuth" with a Dictionary of the operation return values would be exactly what I need.
Thanks!0 -
Even though that's reasonably simple to do, I wouldn't update PUN in the Asset Store anymore, before the holiday season (cause then we wouldn't be available to help with issues).
Can you wait until January or implement a workaround until we update?0 -
Sure, no problem. I can wait until January0
-
This is done and will be in PUN v1.66, which should be out this month. Ping me, if you need it earlier and I'll send you the code early.0
-
I would also benefit from this extra callback.0