Im trying have admob banner ads in my app and I dont want them to show in every scene but in this case they do and I dont know how to prevent this from happening. Thank you.
using UnityEngine;
using System.Collections;
using admob;
public class Admanager : MonoBehaviour
{
public static Admanager Instance { set; get; }
public string bannerId;
public string videoId;
private void Start()
{
Instance = this;
Admob.Instance ().initAdmob (bannerId, videoId);
DontDestroyOnLoad (gameObject);
Debug.Log("load?");
}
public void ShowBanner()
{
Admob.Instance().showBannerRelative(AdSize.Banner, AdPosition.BOTTOM_CENTER, 5);
Debug.Log("showing?");
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using admob;
public class DisplayBannerAd : MonoBehaviour
{
void Start ()
{
Admanager.Instance.ShowBanner ();
Debug.Log("Banner Ad Shown:");
}
}