plugins - How to add ADMOB banner to Unity? -
I tried to use the guide provided with the official plugin but I failed to understand either the banner ad Or how to add instructions is very unclear Does anyone expose me in a slightly better way to add banner to one of my 2D game scenes?
Create a new script in C # and include the following code.
Using GoogleMobileAds.Api;
Now you have to create a new ad and start it. Therefore, only add the following code to the initial function.
// Create a 320x50 banner at the top of the screen. BannerView bannerView = New banner view ("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);
See the entire tutorial
Comments
Post a Comment