question

soikotseo avatar image
soikotseo asked

RaiseEventOptions does not contain a definition for ForwardToWebhook

Hi, I am a beginner. I am using https://api.playfab.com/docs/tutorials/landing-tournaments/photon-unity this tutorial for test. I can see RaiseEventOptions does not contain a definition for ForwardToWebhook error in my c# editor also this error PhotonNetwork does not contain a definition for room.

 private void ExecuteExample()
    {
        // Raise custom room event
        var data = new Dictionary<string, object>() { { "Hello", "World" } };
        var result = PhotonNetwork.RaiseEvent(15, data, true, new RaiseEventOptions()
        {
            ForwardToWebhook = true,
        });
        LogMessage("New Room Event Post: " + result);
        // Set custom room property
        var properties = new ExitGames.Client.Photon.Hashtable() { { "CustomProperty", "It's Value" } };
        var expectedProperties = new ExitGames.Client.Photon.Hashtable();
        PhotonNetwork.room.SetCustomProperties(properties, expectedProperties, true);
        LogMessage("New Room Properties Set");
    }
documentation
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JayZuo avatar image
JayZuo answered

This tutorial is based on PUN V1 and in this version, there is ForwardToWebhook property in RaiseEventOptions. I'd suppose you are using PUN 2 now, in which, there is no ForwardToWebhook anymore. What you will use is WebFlags. For more info, see https://forum.photonengine.com/discussion/12556/photon-v2-playfab-webhooks.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.