Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity Ads not starting

Discussion in 'Unity Ads & User Acquisition' started by ZYRHA_, Mar 17, 2020.

  1. ZYRHA_

    ZYRHA_

    Joined:
    Feb 6, 2016
    Posts:
    8
    I just published my game to the Play store, and the ads don't appear, this is my Ads script:

    public void AdStart()
    {
    if (Advertisement.IsReady("video"))
    {
    Advertisement.Show("video");
    }
    }
    public void RewardedAdStart()
    {
    if (Advertisement.IsReady("rewardedVideo"))
    {
    Advertisement.Show("rewardedVideo");
    }
    }

    I also get the message: "No data for this time period" In my Unity dashboard.
    I have all the correct setups: ads services enabled, debug option disabled, Unity dashboard project created directly from the engine, etc...
    Does this happens because I just published my game and I need to wait some time? Or am I missing something important?
     
  2. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    Yes, you need to wait for some time until data is available.

    For the problem that the ad is not shown, you should make sure that the ad is ready. You can use
    Code (CSharp):
    1. Debug.Log (Advertisement.IsReady("video"))
    to debug whether the ad is ready.
     
  3. ZYRHA_

    ZYRHA_

    Joined:
    Feb 6, 2016
    Posts:
    8
    Thanks for the response!

    I finally got the ads working by adding this to my script:

    private void Start()
    {
    Advertisement.Initialize("xxxxxxx", true);
    }

    At first I thought It wasn't necessary because I enabled the built-in Ads extension in the advanced settings. But now the "videos" and "rewarded videos" are showing.
    I'm still getting the "No data for this time period" message on my dashboard though, but i'll wait some time like you said :)
     
  4. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    Enable test mode will show test ads, and the data of test ads will not be displayed on the dashboard.

    Could you provide the app store link for me to check?
     
  5. ZYRHA_

    ZYRHA_

    Joined:
    Feb 6, 2016
    Posts:
    8
  6. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
  7. ZYRHA_

    ZYRHA_

    Joined:
    Feb 6, 2016
    Posts:
    8
    Yay!!
    Thanks allot!
    So there is no need to change: "Advertisement.Initialize("xxxxxxx", true);" to "false"?
     
  8. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    "Advertisement.Initialize("xxxxxxx", true);" will affect your current build.

    If your current release version is set to false, then you do not need to change it. If it is set to true then you need to set it to false to show live ads.

    In addition, there is another feature that does not need to modify the code. You can set the test mode to false in the d、Dashboard. This setting will override the settings in the code and let your app show live ads.
    upload_2020-3-19_15-18-30.png