Result callback not called after showing an Ad

Hello,

I am integrating Unity Ads in our games and generally this works fine, the ads are displayed as expected, however I noticed, that the callback is not called at all. Below is the code, nothing too complicated, I don’t see an obvious error.
All help or ideas are appreciated.

Best regards.

public static void showAdWithConfirmation () {
        Debug.Log("Ads Manager: SHOWING AD and waiting for callback!"); // THIS IS DISPLAYED

        if (UnityEngine.Advertisements.Advertisement.IsReady()) {
            UnityEngine.Advertisements.ShowOptions options = new UnityEngine.Advertisements.ShowOptions ();
            options.resultCallback = result => {
                Debug.Log("Ads Manager: callback called"); // NOT DISPLAYED
                switch (result) {
                    case UnityEngine.Advertisements.ShowResult.Finished: {
                            Debug.Log("Ads Manager: Ad watched"); // NOT DISPLAYED
                            break;
                        }
                    default: {
                            Debug.Log("Ads Manager: Ad NOT watched"); // NOT DISPLAYED
                            break;
                        }
                }
            };

            UnityEngine.Advertisements.Advertisement.Show(); // AT THIS POINT THE AD IS DISPLAYED... but no callback call after closed
        }
    }

Hi,

You should pass the options object as parameter to Advertisement.Show() method

/Rasmus

Omg… This is so embarrassing…
But nevertheless, thank you :slight_smile: