3. Ask for Ads in your Application
Your app needs to ask for ads.
If you are creating new code:
See the AeriaCanada/AdMobMediation/Demo/Simple folder for a demo that you can run and (with ad placements entered in) will show you ads.
You might also look at the AeriaCanada/AdMobMediation/Demo/Hub folder to see the major parts of what the Hub code looks like after it was modified to call for AdMob ads. (It also has code that records analytics that I’m happy with).
If you are integrating with an existing FPS/CCode project:
Search the project for ‘AdCentral’ and then copy the contents of AeriaCanada/AdMobMediation/Demo/FPS (CCode)/AdCentral.cs.txt to the existing AdCentral.cs in _FPSProject/Scripts/Advertisements/Monetization/AdCentral.cs.
Also note that you are likely to get a error in LaunchController that can be fixed by commenting out the ‘#using Unity.Advertisments’ line near the start.
Lastly, you’ll need to go to Edit -> Project Settings -> Player, and, under ‘Other Settings’ find the Scripting Define Symbols. It is a list of defines separated by semicolons. You’ll need to remove everything from the list that looks like USE_[SomeAdNetwork].
For example,
USE_ADMOB;CROSS_PLATFORM_INPUT;USE_HEYZAP;MOBILE_INPUT;USE_C17_MODE;USE_VUNGLE;USE_MINIMAL_MODE;NO_GPGS;USE_UNITY_ADS
becomes
CROSS_PLATFORM_INPUT;MOBILE_INPUT;USE_C17_MODE;USE_MINIMAL_MODE;NO_GPGS
I think it’ll compile at this point. (The last pages of this document talk about dealing with build errors.)
