Make sure you have added the App ID inside the Google Ad Mob settings window.
In the case of live ad id (Test mode off), this may happen if there is no fill from the Google server.
You might run into this issue when using Unity Editor Version 2021 or above with Admob versions 8.x.x. To fix this, make sure you are building your application with IL2CPP as your scripting backend.
If it’s a 3d game the camera and the ad unit must be on the side + Z world axis to get an impression.
Make sure there is no collider between the main camera and the ad Unit.
If you are instantiating ad prefabs in real-time try disabling the strip engine code option from the build option.
If you have multiple camera’s on the scene make sure the camera which is looking toward the ad unit has the highest priority depth value.
Make sure the Unity Event system component is present in the scene.
Make sure there is no collider between the main camera and the ad Unit.
Make sure the Unity Event system component is present in the scene.
The screen space native ad is not placed inside a Canvas with Overlay render mode
If you run into Gradle issues in Unity 2019 or 2020
Check the Gradle version in the Unity Settings section and point the Gradle to the 2021 Unity version's Gradle file or above.
Check if the Custom base Gradle Template is enabled from the Publishing settings option under project settings
Change the gradle version inside the baseProjectTemplate.gradle (Found under Plugin > Android ) file to 4.0.0
Check and uncheck the Android options inside the External Tools section of the Preferences only keep the Gradle option unchecked after changing the Gradle version for 2019 and 2020.
Do a force resolve in the External Dependency Manager
Check Minimum API Level and Target API Level under project settings>> Player section
Check the API compatibility level to .Net 4x
Check the device cable if it is connected when building the .apk to a device.
If you run into Gradle issues in Unity 2021 or above with Admob v8.6.0 or v8.7.0
Do the following if you run into the above issue.
Make sure Enable kotlinx.coroutines packaging option
in GMA settings is checked. Learn more about the issue here.
Under Player Settings-> Publishing settings,
Check if Custom Main Gradle Template, Custom Gradle Properties Template and Custom Gradle Settings Template
are enabled.
Make sure the scripting backend is IL2CPP and Target API level is at least 33.
Just before you make a build, open External Tools
section under Edit->Preferences.
Check and uncheck the plugins to refresh the installation paths of JDK, NDK, SDK, and Gradle to avoid the warning shown below, especially after updating the required tools. It is a Unity Editor bug where the installation paths to the tools are not updated properly.
The downloaded ad textures build up in memory and may need manual handling in certain cases.
The accumulated textures are cleared when a scene change or reload happens. However, in the following cases, you should manually manage texture memory
Single scene setup
Long-running gameplay scene
Gameplay Restart/ Progression happens without any scene reload or change
Destroying texture assets is an expensive operation. The SDK avoids doing so during gameplay as what would be a good time for the SDK could be bad timing for the game and lead to a framerate drop at a critical point
You can manually invoke Resource.UnloadUnusedAssets() at a strategic point when the gameplay is not demanding to free up the texture memory
If you don't want to use Unity's UnloadUnusedAssets API, you can handle the textures at the level of each NativeAdHolder.
Here is a script that can be used as is or modified to suit your needs
For display templates that show a subset of the ad media:
Do not delete the unused media game object and keep its reference and settings in the DisplayHandler script as it is. No change is required.
Uncheck it's Image component (but let it remain on the game object)
Make adjustments to ensure it does not overlap any displayed ad elements
When the ad loads, the ad icon and big media are loaded into memory (even if not shown). As in the script above you can get the reference to the texture and destroy at a convenient point in the game flow when the intensity is low.