Is there a way to trigger an OperationResponse after an OpRaiseEvent call?
Hi.
I'm using PlayFab as a backend also using Webhooks. I can process any operation I want from PlayFabs CloudScript and return a JSON with the results. I can force an error and receive the error in my client (via OnOperationResponse method). The exception is ofcourse RaiseEvent. I'm not receiving any result from this operation.
Is there any solution of this? Because It could be a nice feature for detecting hackers. Process an event, detect if is a hacking and inmediately return a JSON with the results.
If there is no solution, could you explain me an efficient way to detect hackers? Maybe checking the backend server after every Event separately from Photon, for example?
Thank you.
Jordi.
I'm using PlayFab as a backend also using Webhooks. I can process any operation I want from PlayFabs CloudScript and return a JSON with the results. I can force an error and receive the error in my client (via OnOperationResponse method). The exception is ofcourse RaiseEvent. I'm not receiving any result from this operation.
Is there any solution of this? Because It could be a nice feature for detecting hackers. Process an event, detect if is a hacking and inmediately return a JSON with the results.
If there is no solution, could you explain me an efficient way to detect hackers? Maybe checking the backend server after every Event separately from Photon, for example?
Thank you.
Jordi.
0
Comments
-
Hi @Jordi,
Thank you for your good question(s). Making use of the webhooks' response is on our road map but we can't promise you it will happen soon enough.
Client gets response fromRaiseEvent
operation in some cases like when removing event from cache or playing with cache slice. Not really related to your use case but in general, as a way of getting a callback for raising an event, you can send it to yourself also (send toReceiverGroup.All
or add sender actor number to target actors numbers).
To return JSON message fromRoomEventRaised
CloudScript handler you need to setResultCode
to something other than 0. This in theory should send anErrorInfo
event to the client but will have no effect on the operation RaiseEvent's normal processing in Photon. However, you need to enableHasErrorInfo
in your webhooks' configuration which is not available in PlayFab. You should talk to them about this if you're considering my workaround.
Also if you're persisting game data from Photon in PlayFab using CloudScript, we could share insights about design and implementation if that's possible.0