Unity Admob And Google Play Game Services Integration
Solution 1:
The above resources you mentioned are old. Whereas now google has official support for AdMob on Unity game engine.
Get the official plugin here -https://github.com/googleads/googleads-mobile-plugins/blob/master/README.md
-Import the whole package. Modify your androidmanifest.xml to include the permission and activity name.
-Add the google-play-services_lib folder, located at /extras/google/google_play_services/libproject in your sdk, into the Plugins/Android folder of your project.
- Code for basic banner to be included in your C# script:-
using GoogleMobileAds.Api;
// Create a 320x50 banner at the top of the screen.
BannerView bannerView = new BannerView("YOUR_AD_UNIT_ID", AdSize.Banner, AdPosition.Top);
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the banner with the request.
bannerView.LoadAd(request);
And you would be able to see Ads on the top of your level on which that particular script is attached.
Solution 2:
The above resources you mentioned are old. there is a new admob plugin for Unity game engine.
Get the new plugin here -https://github.com/unity-plugins/Unity-Admob
-Import the whole package. Modify your androidmanifest.xml to include the permission and activity name.
that is all your need to do
Post a Comment for "Unity Admob And Google Play Game Services Integration"