googleads / googleads-mobile-unity

Official Unity Plugin for the Google Mobile Ads SDK
https://developers.google.com/admob/unity
Apache License 2.0
1.37k stars 1.08k forks source link

Interstitials break Unity Editor #2139

Closed m1cster closed 2 years ago

m1cster commented 2 years ago

[REQUIRED] Step 1: Describe your environment

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

Transition to a scene that shows the interstitial. Two problems arise in unity editor:

  1. A close button for the interstitial is shown, but is not functional. As of that the OnAdClosed callback never gets called and you cannot test the integration of interstitials. Even worse: to test an app that uses interstitials in unity editor, interstitials need to be deactivated.
  2. The test interstitial is shown below the UI and not above like it would be on device. Although that is not critical, it took me some time to even see that the test interstitial was there as i was fading in a blocker graphic over the UI before showing the interstitial.

Relevant Code:

Interstitial.OnAdClosed += OnInterstitialClosed; Interstitial.LoadAd(GetRequest());

private void OnInterstitialClosed(object sender, EventArgs args) { Debug.Log("Interstitial Closed"); // we never get here }

NVentimiglia commented 2 years ago

@m1cster I was not able to replicate the issue. Tested on 7.1.0.