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 …