Search Unity

A force prevents me from displaying ads...

Discussion in 'Unity Ads & User Acquisition' started by kshitijKulkarni, Sep 7, 2020.

Thread Status:
Not open for further replies.
  1. kshitijKulkarni

    kshitijKulkarni

    Joined:
    Mar 25, 2020
    Posts:
    14
    This is the most frustrating problem EVER!!!
    I've published 3 games so far... Implemented unity ads on every single one of them...
    Had no issues with any game with respect to ads. But this new game I'm working on was displaying ads...
    Until this moment that is... My rewarded video ads just...Stopped!
    Test ads don't work either! The sample ad is shown in the editor. But NOT ON ANY ANDROID device. Tried AdMob but my game doesn't open at all with AdMob. I'm hence stuck with unity ads. Here are the things I've tried:
    The errors after debugging say: "Rewarded video is not ready at the moment! Please try again later"
    Waited for days. this is making me lose my mind...
    Here is my code:
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.Advertisements;
    5. public class ADSInit : MonoBehaviour, IUnityAdsListener
    6. {
    7.    
    8.     readonly string gameId = "I have inserted my ID Here";
    9.     readonly string myPlacementId = "rewardedVideo";
    10.     readonly bool testMode = true;
    11.  
    12.     // Initialize the Ads listener and service:
    13.     void Start()
    14.     {
    15.         DontDestroyOnLoad(this.gameObject);
    16.         Advertisement.AddListener(this);
    17.         Advertisement.Initialize(gameId, testMode);
    18.     }
    19.  
    20.     public void ShowRewardedVideo()
    21.     {
    22.         // Check if UnityAds ready before calling Show method:
    23.         if (Advertisement.IsReady(myPlacementId))
    24.         {
    25.             Advertisement.Show(myPlacementId);
    26.         }
    27.         else
    28.         {
    29.             Debug.Log("Rewarded video is not ready at the moment! Please try again later!");
    30.         }
    31.     }
    32.  
    33.     // Implement IUnityAdsListener interface methods:
    34.     public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
    35.     {
    36.         // Define conditional logic for each ad completion status:
    37.         if (showResult == ShowResult.Finished)
    38.         {
    39.             FindObjectOfType<CheckpointCore>().Checkpoint();
    40.         }
    41.         else if (showResult == ShowResult.Skipped)
    42.         {
    43.             // Do not reward the user for skipping the ad.
    44.         }
    45.         else if (showResult == ShowResult.Failed)
    46.         {
    47.             Debug.LogWarning("The ad did not finish due to an error.");
    48.         }
    49.     }
    50.  
    51.     public void OnUnityAdsReady(string placementId)
    52.     {
    53.         // If the ready Placement is rewarded, show the ad:
    54.         if (placementId == myPlacementId)
    55.         {
    56.             // Optional actions to take when the placement becomes ready(For example, enable the rewarded ads button)
    57.         }
    58.     }
    59.  
    60.     public void OnUnityAdsDidError(string message)
    61.     {
    62.         Debug.Log("Error = ");
    63.         Debug.Log("message");
    64.         // Log the error.
    65.     }
    66.  
    67.     public void OnUnityAdsDidStart(string placementId)
    68.     {
    69.         Debug.Log("Ad Triggered");// Optional actions to take when the end-users triggers an ad.
    70.     }
    71.  
    72.     // When the object that subscribes to ad events is destroyed, remove the listener:
    73.     public void OnDestroy()
    74.     {
    75.         Advertisement.RemoveListener(this);
    76.     }
    77. }
    78.  
    Any other resource required shall be provided.
    Regards
    Kshitij Kulkarni
     
  2. kshitijKulkarni

    kshitijKulkarni

    Joined:
    Mar 25, 2020
    Posts:
    14
    I running way behind schedule please help FAST!
     
  3. Unity_Adamski

    Unity_Adamski

    Unity Technologies

    Joined:
    Jul 20, 2020
    Posts:
    110
    Whats happening here is your advertisement is never ready. This can be due to a few reasons. The simplest of which is a lack of fill in your region, for some regions such as India & Pakistan we have issues filling ads due to a low volume of ads in our catalog. Or it is possible that you are trying to use the gameId for iOS on an Android device.
    Is it possible for you to share your device logs, that would help greatly in narrowing down the issue.
     
  4. kshitijKulkarni

    kshitijKulkarni

    Joined:
    Mar 25, 2020
    Posts:
    14
    It was running fine a few days ago...
     
  5. kshitijKulkarni

    kshitijKulkarni

    Joined:
    Mar 25, 2020
    Posts:
    14
    Even test ads don't show
     
  6. kshitijKulkarni

    kshitijKulkarni

    Joined:
    Mar 25, 2020
    Posts:
    14
    All it says is ad did not show due to an error
     
  7. kshitijKulkarni

    kshitijKulkarni

    Joined:
    Mar 25, 2020
    Posts:
    14
    And no, I verified my IDs
     
  8. Unity_Adamski

    Unity_Adamski

    Unity Technologies

    Joined:
    Jul 20, 2020
    Posts:
    110
    Would you be able to create an ads support ticket and send over a debug build of your app? The fact test ads aren't showing is particularly odd.
     
  9. kshitijKulkarni

    kshitijKulkarni

    Joined:
    Mar 25, 2020
    Posts:
    14
    How do i share my device logs?
     
  10. kshitijKulkarni

    kshitijKulkarni

    Joined:
    Mar 25, 2020
    Posts:
    14
    ??
     
  11. kshitijKulkarni

    kshitijKulkarni

    Joined:
    Mar 25, 2020
    Posts:
    14
    I'm new to unity support and community but not to unity platform
     
  12. Unity_Adamski

    Unity_Adamski

    Unity Technologies

    Joined:
    Jul 20, 2020
    Posts:
    110
    You can find info on how t get the device logs here https://docs.unity3d.com/Manual/LogFiles.html. I suggest installing the Android Logcat package from the package manager as it is by far the easiest way.

    To create an ads support ticket you need to go to your Unity Organisation page and select the 'I in a Circle' icon then select 'Contact Support'. Contacting us this way will allow you to share more sensitive material that you would rather not share on the forums
     
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  14. kshitijKulkarni

    kshitijKulkarni

    Joined:
    Mar 25, 2020
    Posts:
    14
    Thx for your help...
    I raised a support ticket
    and it turns out that since I'm situated in India, some ISPs had applied a block to the servers. Unity is fixing this ASAP
     
  15. Bimbuh

    Bimbuh

    Joined:
    Dec 21, 2018
    Posts:
    12
    I have a problem similar to the OP's. Test ads only show when I use the default game IDs, but when I use game IDs from my own project (gotten from dashboard.unity3d.com) the ads never show, not even the test ads in the editor. What have i done wrong? When I created the project in the dashboard, I got a message of the like

    "app xxx has been created!... It will take a moment for the project to be available in all services." Can this be the reason why I'm facing this issue?
     
  16. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @Bimbuh

    The issue that sparked this thread was related to an ISP problem in India. That issue was resolved.

    I would recommend creating a new thread and providing as much information as possible, alternatively you can open a support ticket.

    Yes, that is likely the cause. It can take some time before the project is fully initialized. If it has been more than a day, please open a support ticket and we will investigate further: unityads-support@unity3d.com
     
Thread Status:
Not open for further replies.