Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice
Dismiss Notice
Unity partners with Udacity on Nanodegree program credentials to help you get hired! For more more information see our blog here.

Ads not working.

Discussion in 'Unity Ads' started by BKGamesStudio, Dec 20, 2016.

  1. BKGamesStudio

    BKGamesStudio

    Joined:
    Dec 9, 2016
    Posts:
    12
    I have this game that was using an opt-in advertising option, where the user could click a button, and it would display and add, then award them coins. In the editor it would redirect them to a scene that said "This would be your add unit." I decided after a long period of inactivity to give my game to a friend and have him run it with his organization. (He's new and just started with unity.) He succesfully linked the game with his organization, and both are under a new game ID. The problem is that advertizements never initiallize, and I never see the dummy ad when the button clicked. This is in unity 5.5.0f3. I know the code is correct because when it was linked with my organization it was working perfectly fine.
     
    Last edited: Dec 20, 2016
  2. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    831
    Have you selected Android or iOS as active build target in Build Settings window?

    /Rasmus
     
  3. BKGamesStudio

    BKGamesStudio

    Joined:
    Dec 9, 2016
    Posts:
    12
    Yes, Android is selected as my build target.
     
  4. Wylie-Modro

    Wylie-Modro

    Joined:
    Sep 2, 2016
    Posts:
    1
    A similar thing seems to have happened to me. I changed my product name in the PlayerSettings, and used the same name in the Unity Ads dashboard to create a project and it all seemed to work fine at least in the editor. Then I updated Unity to 5.5.0f3 and now none of the fake ads initialize.
     
  5. webspawn

    webspawn

    Joined:
    Aug 12, 2015
    Posts:
    2
    I have the same issue, Ad never initialize.
    Unity 5.5.0f3 (64bit)
     
  6. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    831
    Hi all,

    Please check device log for device. Look for "Initializing Unity Ads 2.0.x (200x) with game id <game id>", it should at least contain information either about campaign found or an error.

    /Rasmus
     
  7. BKGamesStudio

    BKGamesStudio

    Joined:
    Dec 9, 2016
    Posts:
    12
    So I figured out what is causing the issue, just not how to fix it. When a project is linked to an ad account and refreshing access fails (in the services window), if you try to link it as a new game or manually link it to the same one that failed it no longer recognizes that it is linked to an ad account.

    This is what appears when it successfully works, but when this issue occurs nothing appears in the console, and when ShowRewardedAd() is called it thinks the ad is never ready.

    upload_2017-1-1_19-37-2.png
    upload_2017-1-1_19-40-3.png
     
    kustom likes this.
  8. kustom

    kustom

    Joined:
    May 11, 2012
    Posts:
    66
    Hi guys,

    The same occurs to me. I am on Unity 5.5.0f3 and i always get Advertisement.IsReady() to false.
    I remember i changed then name of the project time ago ( and i never played with Ads in this project )
    I have created a new project now and link to my game and again i cant connect to Unity Ads.

    I will wait for any solution :/

    Cheers,
    Ruben
     
  9. UDN_2b28a598-f7b9-494a-81b5-6bd46e4c2b6a

    UDN_2b28a598-f7b9-494a-81b5-6bd46e4c2b6a

    Joined:
    Jan 2, 2017
    Posts:
    4
    Hi,

    Same here.
    I was working in my project and the ads were showing correctly in the editor and in the phone but suddenly they stopped working.
    I have tried different things to fix it but the ads still don't appear.

    I don't know what's happening.
    Any idea?

    Thanks.
     
  10. VictorCashDaShi

    VictorCashDaShi

    Joined:
    Nov 13, 2015
    Posts:
    21
    I had the same problem, I'd changed my game's name,when I test it localy it shows ads, but when i uploaded it to appstore, it stop showing ads, here is my post https://forum.unity3d.com/threads/unity-ads-not-showing-in-store-live-build.449457/

    The game is live and making ads revenue right now(not any more) Please help!
     
  11. UDN_2b28a598-f7b9-494a-81b5-6bd46e4c2b6a

    UDN_2b28a598-f7b9-494a-81b5-6bd46e4c2b6a

    Joined:
    Jan 2, 2017
    Posts:
    4
    I finally tried to export all my game into a new project and it worked.
     
    kustom likes this.
  12. abar

    abar

    Joined:
    Jan 12, 2014
    Posts:
    67
    I'm also getting this with 5.5.0f3.
    Advertisement.isInitialized always returns false, and GetPlacementState returns NotAvailable

    Any word on a proper solution?
     
  13. psavi

    psavi

    Joined:
    Jul 14, 2014
    Posts:
    2
    I'm getting this too...
     
  14. HappySaila

    HappySaila

    Joined:
    Dec 15, 2015
    Posts:
    2
    Okay. I fixed this after hours of fiddling.

    First:
    Do everything you were told to-do in the code samples.

    Second:
    Import the following ->
    using UnityEngine.Advertisements;
    using UnityEditor.Advertisements;
    using UnityEngine.Purchasing;

    Third (And probably the step you missed):
    Go to the unity ads services. (command.control - 0)
    Go advanced.
    Assign your game Id in unity services ad tab.
     
  15. h0p3y

    h0p3y

    Joined:
    Oct 29, 2012
    Posts:
    1
    i added the manual initialization method and my ads came back

    Advertisement.Initialize ("your-game-id-number-as-a-string");
     
  16. ad_adnan

    ad_adnan

    Joined:
    Mar 11, 2014
    Posts:
    112
    hello, my ads are also not working. please help
     
  17. Omnicron45

    Omnicron45

    Joined:
    Sep 6, 2015
    Posts:
    1
    I had this exact problem where my ads wouldn't initialize automatically as usual and then even when I manually initialized them, Unity would never have an ad ready.
    After hours of trying, the only fix was for me to export my project, import it into a new project, and then link the new project to a whole new project in my Unity Services Account.
     
  18. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    831
    Please in those situations check device log for any relevant info/response from server. If you filter by "UnityAds", you should normally find some error message etc. Relinking project as described above, i.e. in practice using different game ids, could e.g. solve situation if you have reached the daily cap of ~25 ads per game/device.

    So check device log for device, if you cannot find relevant information, feel free to send it to support (see https://unityads.unity3d.com/help/help/contact).

    Thanks,
    Rasmus
     
  19. Jaysonmeribe

    Jaysonmeribe

    Joined:
    Mar 13, 2017
    Posts:
    7
    I have all the right and everything but my ad won't load and play here is my code I literally copied from the unity ads service code samples page in unity.
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.Advertisements;

    public class Ads : MonoBehaviour {

    public void ShowRewardedAd()
    {
    if (Advertisement.IsReady("rewardedVideo"))
    {
    var options = new ShowOptions { resultCallback = HandleShowResult };
    Advertisement.Show("rewardedVideo", options);
    }
    }

    private void HandleShowResult(ShowResult result)
    {
    switch (result)
    {
    case ShowResult.Finished:
    Debug.Log("The ad was successfully shown.");
    break;
    case ShowResult.Skipped:
    Debug.Log("The ad was skipped before reaching the end.");
    break;
    case ShowResult.Failed:
    Debug.LogError("The ad failed to be shown.");
    break;
    }
    }
    }
     
  20. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    831
    @Jaysonmeribe, do you get any error messages or can you describe what doesn't work? Which Unity version and platform (iOS/Android) are you using?

    /Rasmus
     
  21. Jaysonmeribe

    Jaysonmeribe

    Joined:
    Mar 13, 2017
    Posts:
    7
    I am using the newest version of unity, 5.6. and the ads just wont play there is not even a console message appearing.
    I have set my platform.
    Turned on unity ads.
    But everything I try I get the same result.

    I am using android
    I get absolutely nothing in the console
    And the ads don't a leave a trace.
     
  22. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    831
    Please verify that Ads is actually enabled. If you don't get any console message, even in editor, sounds like it's not enabled.

    /Rasmus
     
  23. wsuratt

    wsuratt

    Joined:
    Apr 8, 2017
    Posts:
    3
    Hi, I am having the same problem with the ads not working and no console message. I also double checked and I do have ads enabled in the services window and connected to my project.
     
  24. Jaysonmeribe

    Jaysonmeribe

    Joined:
    Mar 13, 2017
    Posts:
    7
    Its enabled I checked
     
  25. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    831
    Please verify that UnityAdsSetting in ProjectSetting/UnityConnectSettings.asset file contains following:

    Code (CSharp):
    1.   UnityAdsSettings:
    2.     m_Enabled: 1
    3.     m_InitializeOnStartup: 1
    4.     m_TestMode: 0
    5.     m_EnabledPlatforms: 4294967295
    6.     m_IosGameId: (your iOS game id)
    7.     m_AndroidGameId: (your Android game id)
    Especially let me know if m_EnabledPlatforms has different values than this.

    Thanks,
    Rasmus
     
    mochadwi20 and bloogames like this.
  26. wsuratt

    wsuratt

    Joined:
    Apr 8, 2017
    Posts:
    3
    When I click the UnityConnectSettings.asset file, it won't open.
     
  27. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    831
    You might have to change asset serialization for project to "Text Only" under Edit -> Project Settings -> Editor
     
    bloogames likes this.
  28. wsuratt

    wsuratt

    Joined:
    Apr 8, 2017
    Posts:
    3
    Thank you, this fixed the error for me.
     
  29. Jaysonmeribe

    Jaysonmeribe

    Joined:
    Mar 13, 2017
    Posts:
    7
    How do you get to the UnityConnectSettings.asset file, I can't find it
     
  30. mochadwi20

    mochadwi20

    Joined:
    Dec 19, 2016
    Posts:
    9
    The answer is shown by rasmus-unity answer here.

    [​IMG]
     
  31. GeekCats

    GeekCats

    Joined:
    Jul 31, 2014
    Posts:
    58
    Same error here, on 5.3.2
    mine is m_EnabledPlatforms: 4294964991
    even if i change to 4294967295 still no ad

    on console:
    show Unity ads video on Win
    UnityEngine.Debug:Log(Object)
    InitScript:ShowVideo() (at Assets/***/Scripts/System/InitScript.cs:307)
    InitScript:ShowAdByType(AdType) (at Assets/***/Scripts/System/InitScript.cs:300)
    InitScript:CheckAdsEvents(GameState) (at Assets/***/Scripts/System/InitScript.cs:287)
    LevelManager:set_gameStatus(GameState) (at Assets/***/Scripts/LevelManager.cs:449)
    <PreWinAnimationsCor>c__Iterator3:MoveNext() (at Assets/***/Scripts/LevelManager.cs:1350)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
     
  32. Humanval

    Humanval

    Joined:
    May 24, 2016
    Posts:
    1
    my too : m_EnabledPlatforms: 4294964991 in 5.6.1.f1