FAQ

Common issues users face

Ads only work on a real device.

The name 'BannerPosition' does not exist in the current context

Add at the beginning of your file

using Gley.MobileAds;

The name 'BannerType' does not exist in the current context

Add at the beginning of your file

using Gley.MobileAds;

No overload for method 'SetAdmobAppID' takes 3 arguments

Install the Admob Patch located inside Gley/MobileAds/Patches


The name 'FindObjectsByType' does not exist in the current context

Fix 1:

Upgrade Your Unity Editor to a LTS version of Unity greater than 2021.3.29

Fix 2 when it is not possible to upgrade to a LTS version:

Replace the new FindObjectsByType

With the old FindObjectsOfType which is marked as obsolete in the latest versions of Unity.

FindObjectsByType<Canvas>(FindObjectsSortMode.None);
//becomes
FindObjectsOfType<Canvas>();

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

The fix is available here:

GoogleMobileAdsSettings does not contain a definition for DelayAppMeasurementInit

To fix it, update Gley Mobile Ads to version 2.0.8 or above and install the AdmobPatch.package located inside Assets/Gley/MobileAds/Patches/

Cannot see test ads

Make sure to Force Resolve your Android dependencies.


Cannot see live ads

Make sure your app is signed with the release key and uploaded to Google Play and downloaded using your test user.

Make a build with the test scene provided with debug mode enabled and see what errors do you get. You will then know what went wrong with your integration.


Why in V2 cannot use multiple ad providers?

You can, but you have to use Admob, Applovin, or Level Play (ironSource) and mediate all other advertisers you want through them. This method will increase your ad revenue compared with our internal mediation we used before in V1.

We removed the internal mediation due to the following reasons:

  • Since we are not an ad provider and do not want to become one, we are not able to use bidding, which increases your revenue a lot.

  • Due to recent GDPR consent regulations which will become active from January 2024, custom consent popups are no longer accepted, you have to use verified solutions. There is not a universal solution verified for all ad providers. So in our legacy V1, we were forced to show a GDPR popup for Unity and the custom UMP popup for Admob. Those 2 cannot send the result between them. This will be a bad experience for the user having to accept or deny a consent popup every time an ad for a new advertiser is displayed. Also, this method is not compliant with the requirement to have a button in settings to change the consent later.

  • Ad provider SDKs are not compatible with them. If you use multiple one it is 100% sure that you have build issues and you have to figure out how to fix gradle issues and duplicate files that sometimes are hard to find and if you delete the wrong one, your ads no longer work. Mediation adapters offered by ad providers are compatible between them, so less build errors to fix.

Due to the reasons listed above, we decided to drop the internal mediation and we think this is the best approach for everyone: easier to use, more customizable, and with higher revenue due to bidding.

My show rate is low

The show rate represents the percentage of ads loaded and shown. In the Gley plugin, upon app start, an ad is loaded. If the app is closed before showing this ad, the show rate is 0%. If the loaded ad is shown, another ad is then loaded. For example, if 2 ads are loaded and only 1 ad is shown, the show rate would be 1/2 = 50%. Similarly, if 2 ads are shown but 3 are loaded, the show rate would be 2/3 = 66%. However, due to the mechanics of the Gley plugin, achieving a show rate close to 100% is not typically possible.

Here is a link for a better explanation:

Last updated