Dear PlayFab community,
I am working with PlayFab, Photon, and Unity. I recently developed a better understanding of Photon Webhooks after wrestling with some issues explained here.
The link above still pertains to my "test bed" and various configurations, but I can provide the most recent examples if anyone needs.
My current issue is that it seems if PlayFab is generating multiple PathEvent Webhook calls under a certain set of circumstances.
Consider the following C# snippet in my Photon PunBehavior's OnRoomJoined() override:
public override void OnJoinedRoom() { Log.Debug("OnJoinedRoom()"); RaiseEventOptions rvo = new RaiseEventOptions(); rvo.ForwardToWebhook = true; PhotonNetwork.RaiseEvent(0 /*EvCode*/, null, true, rvo); #if TEST Hashtable hash = new Hashtable(); hash.Add("key", "value"); PhotonNetwork.room.SetCustomProperties(hash, null, true); PhotonNetwork.player.SetCustomProperties(hash, null, true); #endif }
When TEST is defined, the code is setting some arbitrary properties in the Photon room.
Here is my PlayStream output, first with TEST not defined (green outline), then with it defined (purple outline):
According to @Hamza Lazaar, who was helping me debug a previous issue, only *one* PathEvent Webhook was issued by Photon (he was monitoring my traffic via proxy) when 3 events showed up on my PlayStream.
Here are the contents of the PlayStream events for those three PathEvent entries (in order by Timestamp):
Note that each PlayStream event has their own unique EventId value, indicating that they're separate instances.
What's weird, is that it looks like those secondary events have the PathGameProperties Webhook-type "residue" in them. The first event has the EvCode, as expected, but the others don't. The third one has a TargetActor key in it that looks interesting and possibly meaningful in troubleshooting this issue?
This behavior is unexpected (I believe), and, according to @Hamza Lazaar, only one invocation to the PathEvent was made from Photon. This suggests that maybe there's something awry with the Photon/PlayFab integration for the Webhooks?
I'm hoping that someone can explore this issue and let me know if this is expected behavior or if it's a configuration-related problem or a bug.
As always, thanks in advance for any help anyone can provide!