A NEW INDEPENDENT PLUGIN WITH NEW FEATURES…
Hi Guys, After putting a lots of effort on Admob integration with Unity, i have something for you all.
Please Read full tutorial before start. might you miss some important points. Good Luck
Now its not just basic, i advanced it to some more control over Admob.
NEW FEATURES;
1. Make Adv visible or invisible anytime.
2. Completely Disable Adv programatically.
3. Perform 4 Animations on AdView container so that they appear or disappear smoothly.
Here is the basic AdMob package implementation that works with almost every Unity Version greater den(i tested on 3.2, 3.3, 3,4 3.5)
The older method, i found in Unity Forums is no more working hav some issue with ANT Android SDK version eclipse.
What you need to implement??:
JUST Unity with android SDK
Direction of Using Admob Plugin.
Class AdvertisementHandler.cs contains functions that you can call from anywhere in your Unity Project bcoz its a static class.
Now, lets take a trip of features in this class to control Admob plugin.
1. Instantiate: Call this function only once in life of unity project run. This function will instantiate all variables in plugin. This function have some arguments:
-
- Your Admob PublisherIdD.
-
- Advertisement Size: You can choose your advertisement Size or Let the plugin handle(Recommended). Please choose anyone from AdvSize enum
-
- advOrient: Gives you control over Advertisement Orientation. Please choose anyone from AdvOrientation enum
-
- Position 1 Position 2: Its a combination of two direction where you want Advertisement to display. Please choose anyone from Position enum
-
- isTesting: Its a boolean variable. Set this to true, if your are testing your unity game. This will affect your eCPM
-
- animIn: Animation for Advertisement container, when application receive Advertisement. Please choose anyone from AnimationInType enum. Use NO_ANIMATION for No Animation.
-
- animOut: Animation for Advertisement container, when application receive Advertisement old container need to go. Please choose anyone from AnimationOutType enum. Use NO_ANIMATION for No Animation.
- . levelOfDebug: Define Level of debud log in device LogCat here. None: you wont get any log from admob plugin, LOW: you will get minimal required logs, HIGH: You will get flood of logs in your device logcat.
2. EnableAds(): Call this to enable Ads.
3. DisableAds(): Call this to disable Ads. Use EnableAds() to regain Advertisements.
4. HideAds(): This will Hide Advertisement temporarily. Use ShowAds() to make Adv visible again.
See “AdvertisementManager.cs” for more detail of how to control Admob Plugin.
Attach “AdvertisementManager.cs” on a game object to make it run.
NOTE: 'AdvertisementHandler.cs" is a static class, so use above functions like “AdvertisementHandler.EnableAds()” without creating any object of class.
I Have Attached Two 7z file:
- AdmobUnityPackage.7z: This contains only file for your project.
- AdmobProject.7z: Contains a complete test project.
IMPORTANT:
If you are planning to use with another plugin, then in AndroidManifest.xml change value key in below line to True. By default its set to False
.
If nothing happens on Adv click, then use above changes in AndroidManifest.xml
If you get any issue plz share with me with full log from plugin. ![]()
![]()
UPDATED TO LATEST ADMOB SDK 6.0.1
HAPPY GAMING…
Thankx for using this plugin…
864113–36492–$AdmobUnityPackage.7z (541 KB)
864113–36493–$AdmobProject.zip (803 KB)

