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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[5.3] Unity ADS not working

Discussion in 'Unity Ads & User Acquisition' started by Dr. Argento, Dec 16, 2015.

  1. Dr. Argento

    Dr. Argento

    Joined:
    Jan 29, 2015
    Posts:
    23
    I'm using this code:

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.Advertisements;
    3. public class UnityAdsExample : MonoBehaviour
    4.      {
    5.        public void ShowRewardedAd()
    6.        {
    7.          if (Advertisement.IsReady("rewardedVideoZone"))
    8.          {
    9.            var options = new ShowOptions { resultCallback = HandleShowResult };
    10.            Advertisement.Show("rewardedVideoZone", options);
    11.          }
    12.        }
    13.    
    14.        private void HandleShowResult(ShowResult result)
    15.        {
    16.          switch (result)
    17.          {
    18.            case ShowResult.Finished:
    19.              Debug.Log("The ad was successfully shown.");
    20.              //
    21.              // YOUR CODE TO REWARD THE GAMER
    22.              // Give coins etc.
    23.              break;
    24.            case ShowResult.Skipped:
    25.              Debug.Log("The ad was skipped before reaching the end.");
    26.              break;
    27.            case ShowResult.Failed:
    28.              Debug.LogError("The ad failed to be shown.");
    29.              break;
    30.          }
    31.        }
    32.      }
    In my button onClick event I refer to ShowRewardedAd() but nothing happens, in version 5.2 of unity this process worked like a charm, but not now.

    Any solution?

    PS: I tried in blank project too
    PS 2: Platform - Android | Enable Test mode - On
     
  2. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,312
  3. Dr. Argento

    Dr. Argento

    Joined:
    Jan 29, 2015
    Posts:
    23
    Yes but for any reason wasn't active, problem solve now, thnks @rasmus-unity !
     
    rasmus-unity likes this.
  4. rdvt

    rdvt

    Joined:
    Aug 23, 2014
    Posts:
    23
    I have the same problem with Unity 5.3.3
     
  5. rdvt

    rdvt

    Joined:
    Aug 23, 2014
    Posts:
    23
    I have a temporal solution, just use the old dashboard to add your game