Please note that this issue was already reported in https://github.com/googleads/googleads-mobile-unity/issues/2728. @NVentimiglia confirmed the issue and said a fix will be available in the next release. Since the next release is published and no function of the 'RewardedInterstitialAd' class is fixed I'll reopen the issue. Please do not close this issue until you you fixed it. Thanks
[REQUIRED] Step 1: Describe your environment
Unity version: 2021.3.16f1
Google Mobile Ads Unity plugin version: v8.3.0
Platform: Android
Platform OS version: Target: API 33
Any specific devices issue occurs on: Tested on different devices with different Android versions
Mediation ad networks used, and their versions:
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
Rewarded interstitial ad events do not occur on the main Unity thread, despite setting "MobileAds.RaiseAdEventsOnUnityMainThread" to true. Depending on what actions are taken in this event call-back, this may result in the application crashing.
Please note that this issue was already reported in https://github.com/googleads/googleads-mobile-unity/issues/2728. @NVentimiglia confirmed the issue and said a fix will be available in the next release. Since the next release is published and no function of the 'RewardedInterstitialAd' class is fixed I'll reopen the issue. Please do not close this issue until you you fixed it. Thanks
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem Steps to reproduce:
Rewarded interstitial ad events do not occur on the main Unity thread, despite setting "MobileAds.RaiseAdEventsOnUnityMainThread" to true. Depending on what actions are taken in this event call-back, this may result in the application crashing.
This problem was already mentioned in the issue https://github.com/googleads/googleads-mobile-unity/issues/2676 Relevant Code:
As you can see here: https://github.com/googleads/googleads-mobile-unity/blob/v8.3.0/source/plugin/Assets/GoogleMobileAds/Api/RewardedInterstitialAd.cs
The events are still called via
_client.OnAdClicked += () => { if (OnAdClicked != null) { OnAdClicked(); } };
but should be called via
_client.OnAdClicked += () => { MobileAds.RaiseAction(() => { if (OnAdClicked != null) { OnAdClicked (); } }); };