Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Unity Issues with Ads from Services window? Missing assemblies? - look here

Discussion in 'Unity Ads' started by mikaisomaa, Sep 12, 2017.

  1. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    356
    State and the future of the Unity Ads services integration

    Quick background

    There are currently two ways of integrating Ads SDK into a Unity project, either using the integrated SDK using Services window or downloading the Asset Store package from https://www.assetstore.unity3d.com/en/#!/content/66123

    The engine integrated version of Ads SDK should ideally allow e.g. simpler integration as it has automatic initialization of ads, however with slower updates of Ads SDK, since it requires a new version of Unity before we can include latest Ads SDK.

    Using the Asset Store version of Ads SDK on the other hand provides more flexibility for the game developer in terms of initializing Ads, and also faster access to updates for Ads SDK, as we can update the Asset Store package independent from Unity engine releases.

    Issues with the current engine integration

    We're aware there have been some issues with how the Ads integration works when integrated from the services window - and are addressing these with the launch of the package manager. However, before this feature is fully out - some of you might run into ads not working in production builds.

    Troubleshooting issues with engine integration in Unity 2017.2 and below

    In general a safe way to deal with issues is to switch to using Asset Store version of Ads SDK. However as there are benefits to using the engine integrated version (one less dependency to maintain), we here provide a list of issues most commonly reported on forums by you.

    Note: This is the easiest supported way to avoid and work around possible issues with the Services -window integration for Ads.

    Ads doesn’t initialize at all

    Verify that you are building for Android or iOS and verify content of ProjectSettings/UnityConnectSetting.asset file according to https://forum.unity3d.com/threads/ads-not-working.447164/#post-3060532

    If your ads work in the editor, but not on live builds - check the file ProjectSettings/UnityConnectSettings.asset

    It should contain following Ads settings section:

    UnityAdsSettings:
    m_Enabled: 1
    m_InitializeOnStartup: 1
    m_TestMode: 0
    m_EnabledPlatforms: 4294967295
    m_IosGameId: (your iOS game id)
    m_AndroidGameId: (your Android game id)​

    Usual issues:
    • m_EnabledPlatforms has a wrong value. Use the value above to see if it's fixed.
    • m_InitializeOnStartup is set to zero. Set it to 1 to initialise ads when the app starts.
    Unity Package Manager

    Unity is working on a package manager feature for the editor, which will simplify distribution of packages like e.g. Unity Ads SDK. The Package Manager will eventually replace both Asset Store package and engine integration, allowing us to ship new version of Ads SDK outside the editor release cycles. We focus our work on Package Manager for now, however cannot say in which Unity version this will finally ship. But we are just as interested as you in making the integration of Ads SDK as easy and smooth as possible, so you can focus on building your games.
     
    ilixotek likes this.
  2. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    860
    I wish those issues would be highlighted more.

    I was on 2017.1.1f1 and an older project that was updated to this version continued to work, while a new one (created with 2017.1.1f1) did not. I spend a day trying to fix the new project since the older project worked after updating it to 2017.1.1f1.

    Downloading patch 3 now, let's hope this works better :)
     
  3. GUETling

    GUETling

    Joined:
    Sep 27, 2017
    Posts:
    1
    If you click on the content of the AD to download, will there be additional revenue?
     
  4. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    860
    I got it working on 2017.1.1p3, however it keeps automatically changing the Project settings to the wrong values (unclear when / why this happens).

    @mikaisomaa

    I really recommend changing the title to something like "Issues with Ads Service, missing assemblies, etc. --- look here"

    The current title suggest kind of a vague roadmap topic...
     
  5. Alexandr1234

    Alexandr1234

    Joined:
    Aug 21, 2017
    Posts:
    2
    Привет, у меня есть встроенная реклама Unity Ads, но после примерно 20 показов объявления перестают загружаться. Если я переустановил свою игру, объявления снова отобразятся. Что может быть неправильным? спасибо
     
  6. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    453
    Hi - where do I find "ProjectSettings/UnityConnectSetting.asset file " and 2. I have latest 2018 build and this is still happening, so I'm going to use the package from the asset store. Do you know when the integrated ads will be updated with a fix?
    Thanks
     
  7. TheKingOfTheRoad

    TheKingOfTheRoad

    Joined:
    Apr 24, 2013
    Posts:
    55
    Hello. Where i can find the solution to the Unity Ads Button turning Off and dissapearing from my project inside Services? Is this a bug?
     
  8. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    356
    Have you witnessed an issue of game crashing when watching a brand ad?
     
  9. Razorlance

    Razorlance

    Joined:
    Aug 25, 2014
    Posts:
    15
    I've got the same issue using 2018.2.8 where I need to manually initialise my game to get Ads to work when using Ads services (i.e. not the package)
    I seemed to be missing some variables from the UnityConnectSetting.asset file and entered them as the OP mentions, my UnityAdsSettings entry is as follows:

    UnityAdsSettings:
    m_Enabled: 1
    m_InitializeOnStartup: 1
    m_TestMode: 0
    m_EnabledPlatforms: 4294967295
    m_IosGameId: #######
    m_AndroidGameId: #######
    m_GameIds:
    AndroidPlayer:
    iPhonePlayer:
    m_GameId:

    I added the EnabledPlatforms entry and added my game ids to the relevant entries but I still need to manually initialise the game
    (The hashes replace my game ids. not sure if making them public is a good idea or not!)
     
  10. Geads

    Geads

    Joined:
    Aug 24, 2017
    Posts:
    26
    I'm having the same issue Razorlance is having. When I add m_EnabledPlatforms: 4294967295 and save it, it goes away. Android ads work perfect, editor ads work perfect, just iOS messing up. It crashes the game when the ad is supposed to run.
     
  11. Zaine7673

    Zaine7673

    Joined:
    Feb 15, 2018
    Posts:
    113
    I'm using the monetization SDK and have been having a stupendous amounts issues with it. After spending a lot of time googling I've managed to get the test ads to work in the editor. I've removed advertisements from the package manager. I've switched off ads from the services menu. I've changed the UnityConnectSettings.asset file to match the above with my own game id but still i cant get the ads to show on an android device.
    test ads work only in the editor. So what is the solution now as for my project, the solution above does not work.

    UPDATE: just noticed that after changing the unityconnectsettings.asset file it keeps changing back to exclude the line - m_EnabledPlatforms: 4294967295 - tried it multiple times but it wont retain that line.
     
  12. ilixotek

    ilixotek

    Joined:
    Sep 1, 2018
    Posts:
    2
    Info on this forum was very useful for me today, thanks. Just wanted to post the resolution to an issue I was having here, since it wasn't immediately obvious. Ran into the following build error on Android after (incorrectly) setting up Unity Ads - "com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives"

    The issue was that I had Ads turned on in Unity Services so it was included via Package Manager, but also had imported the Monetization package from the Asset Store. Removing the latter (including the Plugins folder) allowed me to solve the issue; also required was switching my script implementation from the Monetization namespace to Advertisements.

    Googling that error led me down a few rabbit holes, and it took some more searching online to realize that there are different script implementations for the Asset Store vs. Services integrations
     
    SteveFoxx likes this.
  13. Tim-Duval

    Tim-Duval

    Joined:
    Sep 2, 2015
    Posts:
    385
    Where exactly can I find this at?


    ProjectSettings-UnityConnectSetting.JPG


    I went to Edit>>Project Settings>> (Where to go from here?)
     
  14. javierfed

    javierfed

    Joined:
    Apr 10, 2015
    Posts:
    5
    I am pulling my hair out trying to figure out what is going wrong... I have updated to the latest unity (2018.3.11f1) and pulled in the latest version of advertisement via Packages (3.0.3). ads do not work in editor or live. Advertisement.IsReady() always returning false... this is on a build that is already in production, just gotten latest and tried to publish and found the ads failing to work. please tell me some things to try
     
    Tim-Duval likes this.
  15. momcil0

    momcil0

    Joined:
    May 23, 2016
    Posts:
    3
    I am also running into issues where Advertisement.IsReady() always returns false.

    Moreover, in Services/Ads window in the editor it always shows that I need to import the latest Unity Ads plugin from the asset store - which I did, but it keeps saying the same thing. Is there a way to force import this plugin? Because I have tried numerous things, but without success. I am on Unity 2018.2.21f1 (because of UnityScript I'm using in the game), but the same thing happened with 2018.3.11f1 that I tried to install and see if it would work there.

    Another funny symptom is: If I just open my backed-up project and I make an Android build - ads work just fine. However, the moment I open Services and go into Ads, the notification pops up and I'm screwed from then on - all subsequent builds won't deliver videos.

    How can I make Unity realize that I have updated the Unity Ads to the latest version?
     
    Tim-Duval likes this.
  16. Tim-Duval

    Tim-Duval

    Joined:
    Sep 2, 2015
    Posts:
    385
    Have you tried uninstalling Unity Monetization plgin, then import using UnityEngine.Advertisements ? From my understanding, the only real difference is that if there's an update to Unity Ads they can send the update directly to Unity Monetizaion, whereas, using Advertisements, you'd have to wait until the next Unity version update. That's why they recommend Unity Monetization, however, I can't get past this bug we're experiencing. Adverisements didn't work for me either, but I was using an Alpha version at the time. Both said "everything looks good" but niether would show ads in game. Annoying!

    Also note- Unity forum is seemingly useless. The Unity staff don't even try to pretend they care. S***ty!
     
  17. jawaadsheikh

    jawaadsheikh

    Joined:
    Nov 19, 2016
    Posts:
    7
    You need to open Windows Explorer to your Project folder (or open a shell on Mac) and manually edit the file either using Notepad or VI - You won't be able to edit this inside of Unity. Unfortunately its not as easy to do in Windows as it is on a Mac. I'm hoping after installing the BASH shell on Windows that it will be easy to do.
     
    Last edited: Jun 14, 2019 at 5:11 PM
  18. jawaadsheikh

    jawaadsheikh

    Joined:
    Nov 19, 2016
    Posts:
    7
    It looks like you can't use this hack anymore (I'm using 2018.2) Any suggestions on what to try? I've tried uninstalling and reinstalling the plugin, turning off and on services and now I'm looking at removing Unity Ads and installing Admob if it will allow me to play an ad as I've lost so much time on this!