Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Ads Not Showing

Discussion in 'Unity Ads & User Acquisition' started by Kareimovich, Jun 1, 2022.

  1. Kareimovich

    Kareimovich

    Joined:
    May 20, 2019
    Posts:
    1
    Hi i'm trying To Get Unity Ads For testing but it's not working


    Code (CSharp):
    1.     public void PlayAd()
    2.     {
    3.         Debug.Log(gameId);
    4.         if (Advertisement.IsReady())
    5.         {
    6.             Debug.Log("Ad is ready");
    7.             Advertisement.Show("video");
    8.         }
    9.         else
    10.         {
    11.             Debug.Log("Ad is not ready");
    12.         }
    13.     }

    i get Ad is ready in log everything seems fine but test ads not showing until i changed game ids with random Android Game id from youtube i have tried to make my owns and make it in test mod but still test ads not showing dose it take time or where is the problem
     
  2. TengUnity3D

    TengUnity3D

    Unity Technologies

    Joined:
    Jun 10, 2022
    Posts:
    9
  3. xGeorgeV

    xGeorgeV

    Joined:
    Aug 8, 2013
    Posts:
    65
    1. ...
    2. Advertisement.Initialize( sUnityAdsAndroidGameID );
    3. Advertisement.Load( "Android_Interstitial" );
    4. ...

    5. public void PlayAd()
    6. {
    7. if (Advertisement.IsReady())
    8. {
    9. Advertisement.Show( "Android_Interstitial" );
    10. }
    11. else
    12. {
    13. Advertisement.Load( "Android_Interstitial" );
    14. }
    15. }