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

Ads show but not on the dashboard unity ads

Discussion in 'Unity Ads & User Acquisition' started by subaktiapps, Jul 21, 2017.

  1. subaktiapps

    subaktiapps

    Joined:
    Feb 8, 2016
    Posts:
    31
    Hi. I have a problem. I added the ad unity ads. And after I tried it the ads have turned up nicely. And I waited for up to 2 weeks no ads ever appeared on the dashboard unity ads.
    My games have got almost 1k downloads.
    This is the code I created.
    please help.

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.Advertisements;
    3. using System.Collections;
    4. using UnityEngine.UI;
    5.  
    6. public class UnityAds : MonoBehaviour {
    7.     public static UnityAds instance;
    8.     public string idadsAndroid;
    9.     public string idadsIphone;
    10.     public bool showads;
    11.     public GameObject playnow;
    12.     public GameObject getkey;
    13.     void Awake()
    14.     {
    15.         if (showads)
    16.         {
    17.             if (Advertisement.isSupported)
    18.             {
    19.                 Advertisement.Initialize(idadsAndroid, false);
    20.                 if (Application.platform == RuntimePlatform.Android)
    21.                 {
    22.                     Advertisement.Initialize(idadsAndroid, false);
    23.                 }
    24.                 else if (Application.platform == RuntimePlatform.IPhonePlayer)
    25.                 {
    26.                     Advertisement.Initialize(idadsIphone, false);
    27.                 }
    28.             }
    29.         }
    30.         else
    31.         {
    32.             playnow.SetActive(false);
    33.             getkey.SetActive(false);
    34.         }
    35.      
    36.     }
    37.     public void clicadd()
    38.     {
    39.         if (Advertisement.IsReady())
    40.         {
    41.             //Debug.Log("vô");
    42.             var option = new ShowOptions { resultCallback = HandleShowResuld };
    43.             Advertisement.Show(null, option);
    44.         }
    45.     }
    46.  
    47.     private void HandleShowResuld(ShowResult obj)
    48.     {
    49.         switch (obj)
    50.         {
    51.             case ShowResult.Failed:
    52.                 break;
    53.             case ShowResult.Skipped:
    54.                 break;
    55.             case ShowResult.Finished:
    56.                 UImanager.uimanager.Playnow();
    57.                 break;
    58.             default:
    59.                 break;
    60.         }
    61.     }
    62.  
    63.  
    64.  
    65.     public void ShowAdsFofEarm3Key()
    66.     {
    67.         if (Advertisement.IsReady())
    68.         {
    69.             Debug.Log("vô");
    70.             var option = new ShowOptions { resultCallback = HandleShowResuld3 };
    71.             Advertisement.Show(null, option);
    72.         }
    73.     }
    74.  
    75.     private void HandleShowResuld3(ShowResult obj)
    76.     {
    77.         switch (obj)
    78.         {
    79.             case ShowResult.Failed:
    80.                 break;
    81.             case ShowResult.Skipped:
    82.                 break;
    83.             case ShowResult.Finished:
    84.                 BuyADS.Instance.StopCoroutine(BuyADS.Instance.delayshow());
    85.                 BuyADS.Instance.StartAnimation("Get 3 keys");
    86.                 break;
    87.             default:
    88.                 break;
    89.         }
    90.     }
    91.     public bool UnityAdsloaded()
    92.     {
    93.         if (Advertisement.IsReady())
    94.         {
    95.             return true;
    96.         }
    97.         else
    98.         {
    99.             return false;
    100.         }
    101.     }
    102.     // Use this for initialization
    103.     void Start () {
    104.         instance = this;
    105.  
    106.     }
    107.    
    108. }
    109.  
     
  2. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Please provide link to app store, so we can take a look

    Thanks,
    Rasmus
     
  3. subaktiapps

    subaktiapps

    Joined:
    Feb 8, 2016
    Posts:
    31
    i sent via PM
    please check it