Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Advertisements Namespace

Discussion in 'Unity Ads & User Acquisition' started by piggybank1974, Jan 11, 2017.

  1. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621
    I get UnityEngine.Advertisements does not exist.

    I'm using Unity 5.5.0p3

    I was under the impression that unity Ads are integrated from 5.2 upwards.

    Do I still need to download the unity assets store package as this puts files in the Plugins folder, This was not mentioned in mikes tutorial (5.2+) and the unite 2016 version he did online.

    Thanks
     
  2. LSTGames

    LSTGames

    Joined:
    Dec 28, 2016
    Posts:
    6
    Oh yeah this is an annoying one that happens all the time. I think it's a syncing problem

    What I do:
    1. close unity
    2. remove UnityConnectSettings form ProjectSettings
    3. open another project
    4. open the project you work on
    5. keep your fingers crossed

    if it's still not working do all the steps again
     
    andymads and fumangy like this.
  3. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621
    @LSTGames

    Yeah cheers, I ended up for some reason, creating copies of the Ad project in unity ads, funny thing is It implies you cannot delete them but archiving them des really delete them, god knows way they did not say that.

    Anyways I did not get the yellow and white text just below the go to dashboard at first, I had to delete the ads service and add it again, then I went to unity assets and downloaded the package (installed Android only so far), they should really give you can option in there to download it there and then for you, they know you need it so why not.

    its my first time with ads but I think I'm there, cheers again, I hope this helps others as well.
     
  4. FritzH

    FritzH

    Developer Relations

    Joined:
    Aug 18, 2015
    Posts:
    45
    Ads in 5.5.0p3 should work if you check the following:

    In build settings -> set build target to iOS or Android
    In Ads service menu > open Advanced -> Toggle "Enable Ads extension"
    Make sure you've included the correct library: "using UnityEngine.Advertisements;" (See code sample)

    If it still doesn't work...
    1. Edit > Project Settings > Editor
    2. Asset Serialization > mode -> Force text
    3. In Finder, open either [Unity project] > ProjectSettings > `UnityAdsSettings.asset` OR `UnityConnectSettings.asset`
    4. Locate these properties, and enable them like so:

    UnityAdsSettings:
    m_Enabled: 1
    m_InitializeOnStartup: 1​
     
    Last edited: Jan 12, 2017
  5. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621
    @FritzH

    Hi thanks for you reply.

    I'm not sure why I'm changing these settings?

    2. Asset Serialization > mode -> Force text

    Mine is Mixed

    3. In Finder, open either [Unity project] > ProjectSettings > `UnityAdsSettings.asset` OR `UnityConnectSettings.asset`

    I have no clue as to what Finder is? are you thinking Windows Explorer or whatever it's called in windows 10 now a days?

    I've got the test ad displayed fine, as from last night, but not tried it on a real device as of yet, I'm assuming I should just get the Test stuff until I change this on the Ads site.
     
  6. fumangy

    fumangy

    Joined:
    Mar 28, 2013
    Posts:
    17
    Thanks, it works for me.