Quantcast
Channel: Questions in topic: "ads"
Viewing all articles
Browse latest Browse all 1416

Can't Hide AdMob Ads Banner

$
0
0
guys im in very beginning learning code in unity. I have my AdMobs script which places the banners, which I just want to place it on my shop screen. but I have problem coding it everyone in internet said if we want to hide the banner ads, we just had to put simple code like bannerView.Hide (); but when I try it, my monodevelop said that "bannerView" doesnt exist here is my code ![void Start () { // Create a 320x50 banner at the top of the screen. BannerView bannerView = new BannerView("ca-app-pub-xxxxx/xxxxxx", AdSize.Banner, AdPosition.Top); // Create an empty ad request. AdRequest request = new AdRequest.Builder() .AddTestDevice(AdRequest.TestDeviceSimulator) // Simulator .Build(); // Load the banner with the request. bannerView.LoadAd(request); } void Update() { if (shopscreen.activeInHierarchy == true) { bannerView.Hide (); Debug.Log("SHOW AD banner"); } else if(shopscreen.activeInHierarchy == false) { bannerView.Show(); }][1] help please .. [1]: /storage/temp/97448-screenshot-324.png

Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>