- Google Mobile Ads SDK v7.4.1
- Unity editor v2021.3.19f1 LTS
- Target Platform: Android
- App status: not published yet
The "Get Started" Admob initialization official guide suggests synchronizing Mobile Ads SDK events and callbacks with the main Unity thread by using the following line of code:
MobileAds.RaiseAdEventsOnUnityMainThread = true;
Unfortunately, if I use it, I get the following error:
Assets\Scripts\AdInitializerScript.cs(32,19): error CS0117: 'MobileAds' does not contain a definition for 'RaiseAdEventsOnUnityMainThread'.
I closely followed the implementation guide and everything else seems to be working, if I don't include that line. What could be causing this?