Is there a way to trigger an OperationResponse after an OpRaiseEvent call?


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.


  • JohnTube
    JohnTube ✭✭✭✭✭
    edited April 2016
    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 from RaiseEvent 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 to ReceiverGroup.All or add sender actor number to target actors numbers).

    To return JSON message from RoomEventRaised CloudScript handler you need to set ResultCode to something other than 0. This in theory should send an ErrorInfo event to the client but will have no effect on the operation RaiseEvent's normal processing in Photon. However, you need to enable HasErrorInfo 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.
  • Thank you @JohnTube.

    I spoke directly with PlayFab and they told me exactly this, HasErrorInfo isn't active and there is no option to activate it.

    I would find this way optimum to save request asking about if the game has been hacked.