Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Ads error

Discussion in 'Unity Ads & User Acquisition' started by liambilly, Jul 27, 2023.

  1. liambilly


    May 13, 2022
    i have hooked up a butn to show an ad im using google ads. the button should show up randomly as with the code below
    Code (CSharp):
    1. public IEnumerator ShowRewardBtn()
    2.     {
    3.         if (gameover) yield break;
    4.         if (adShowing) yield return new WaitUntil(() => !adShowing);
    5.         var time = Random.Range(60, 180);
    6.         yield return new WaitForSeconds(time);
    7.         adShowing = true;
    8.         if (!rewardPanel.activeSelf)
    9.             rewardPanel.SetActive(true);
    10.         StartCoroutine(ShowRewardBtn());
    11.     }
    the problem is it shows in the editor but after i downloaded the game from store, the button never shows up, i have also set up the game from adsense asinthe image attached

    Attached Files: