Пример #1
0
    public void showRandomBanner()
    {
        int random = Random.Range(1, 3);

        Debug.Log(random + " Banner");
        if (random == 1)
        {
            unityAdManager.PlayBannerAd();
            Debug.Log("showing unity reward");
        }

        else if (random == 2)
        {
            adMobManager.RequestBanner();
            Debug.Log("showing google reward");
        }
    }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        //int randomNumber = Random.Range(1, 3);
        Instance          = this;
        adManager         = GameObject.FindGameObjectWithTag("Ad_Manager");
        unityAdManager    = adManager.GetComponent <UnityAdsManager>();
        adMobManager      = adManager.GetComponent <GoogleAdMobManager>();
        combinedAdManager = adManager.GetComponent <CombinedAdManager>();

        Debug.Log("HEYY");
        int randomNumber = Random.Range(1, 3);

        Debug.Log("Random " + randomNumber);
        if (randomNumber == 1)
        {
            adMobManager.RequestBanner();
            Debug.Log("showing ad mob");
        }
        if (randomNumber == 2)
        {
            unityAdManager.PlayBannerAd();
            Debug.Log("showing unity");
        }
    }