Search Unity

The type or namespace name `Advertisements' does not exist in the namespace `UnityEngine'.

Discussion in 'Unity Ads & User Acquisition' started by motorious, May 16, 2017.

  1. motorious

    motorious

    Joined:
    Jun 25, 2016
    Posts:
    11
    Ads are enabled on the services.
    Project is linked on the right project ID.
    Ads settings shows right game ID for iOS and Android.
    Test mode is enabled.

    What should I try next?
     
  2. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
  3. motorious

    motorious

    Joined:
    Jun 25, 2016
    Posts:
    11
  4. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    And you have selected Android/IOS as active platform in Build Settings window?
     
  5. motorious

    motorious

    Joined:
    Jun 25, 2016
    Posts:
    11
    Face, meet palm. Palm, this is face.
    ...
    Funny, that didn't help until I reverted changes that were made on the field m_EnabledPlatforms. What does that field indicate?
     
  6. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    m_EnabledPlatforms indicates which platforms are selected, and should be 4294967295 for enabling Android and iOS. Honestly don't know which enum values/combinations leads to that value :)

    Example of a working ProjectSettings/UnityConnectSettings.asset file:

    Code (CSharp):
    1.   UnityAdsSettings:
    2.     m_Enabled: 1
    3.     m_InitializeOnStartup: 1
    4.     m_TestMode: 0
    5.     m_EnabledPlatforms: 4294967295
    6.     m_IosGameId: (id)
    7.     m_AndroidGameId: (id)
    /Rasmus
     
    TitaniumStudios and zero_null like this.
  7. zero_null

    zero_null

    Joined:
    Mar 11, 2014
    Posts:
    159
    worked like charm
     
    rasmus-unity likes this.