Search Unity

Official 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:
    332
    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:
    790
    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:
    790
    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:
    422
    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:
    54
    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:
    332
    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:
    19
    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:
    107
    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:
    367
    Where exactly can I find this at?


    ProjectSettings-UnityConnectSetting.JPG


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