0

I have a finished game in unity and so I decided to add ads, only rewarded. I used basic scripts, exactly as they are written in unity. The first run of the ad works fine, even if I click on it several times. But the problem is that when I reload the scene the button cannot be clicked. The script will initialize awkwardly at the beginning, but after reloading the scene it won't initialize and I have no idea why. Does anyone know what to do with it please?

Rewarded ads script : https://docs.unity.com/ads/en/manual/ImplementingRewardedAdsUnity

Initializing script : https://docs.unity.com/ads/en/manual/InitializingTheUnitySDK

Daniel
  • 21
  • 2

1 Answers1

1

I just made an account to say that I have had this exact same issue. I, too, used the manuals and ran into this problem. There is another forum with the solution to this problem: Unity Ads 4.0.x- ads wont work on loading next scene or after reloading scene

The solution is add LoadAd(); under the Awake function, like so:

void Awake()
    {   
        // Get the Ad Unit ID for the current platform:
#if UNITY_IOS
        _adUnitId = _iOSAdUnitId;
#elif UNITY_ANDROID
        _adUnitId = _androidAdUnitId;
#endif

        //Disable the button until the ad is ready to show:
        _showAdButton.interactable = false;
        LoadAd();
    }