- Home /
Advertisements does not exist
Hello every body..
Might be this is stupid to ask this question over again but i am not able to fixe it.
Basically i want to use unity advertisement but it alway show that "advertisement does not exist" exact error is:
"Assets/Scripts/Ads/UnityAds.cs(2,19): error CS0234: The type or namespace name Advertisements' does not exist in the namespace
UnityEngine'. Are you missing an assembly reference?"
Though i already enabled the advertisement form services and set my build setting to "IOS". When i try to download the unity advertisement from asset store then my unity cloud build alway got failed and showing the error:
[Unity] Assets/Scripts/Ads/UnityAds.cs(30,29): error CS0433: The imported type `UnityEngine.Advertisements.ShowResult' is defined multiple times
[Unity] /UNITY_PATH/Unity/Unity-5_6_2f1/Unity.app/Contents/UnityExtensions/Unity/Advertisements/UnityEngine.Advertisements.dll (Location of the symbol related to previous error)
Any kind of help will be appreciated.
Reference images :
alt text
Answer by imrankhanswati · Jul 20, 2017 at 07:40 AM
I find the solution for this after long time.
Delete Library folder form your project. path for the folder is: Project \Library
And also delete UnityConnectSettings file from your project path for the file is: Project \ProjectSettings\ UnityConnectSettings.asset
Now open the unity project and let unity reconfigure your project. this will create Library folder and UnityConnectSetting.asset over again for you.
now from unity service window enable unity Advertisement.
if you imported unity Advertisement form unity asset store then remove it before doing above. by using unity asset "package uninstaller".
But make sure that unity is not open by doing the above process.
This answer fix for same problem happen on Unity 5.6.0f3. Just comment for anyone facing same problem will fix asap
What solved for me: I updated from 5.6.3p2 to 2018.3.0f2. Now "using UnityEngine.Advertisements" is not marked as a problem.
Answer by Vollmondum · Jul 05, 2017 at 07:59 AM
Open services, turn ads off and then on again. That's a simple Unity glitch. Happens when you work offline and then get back online.
I tried this many time but it didn't worked for me.
Answer by Soniya_unity · Jul 20, 2017 at 07:32 AM
which version of unity you used?
thanks for your replay and i am using unity 5.6.2f1.
delete all related folder and plugin of unity ads, close the unity , again sign in to your account and on the ads.
Answer by junaidijaz · Oct 01, 2017 at 05:51 PM
just go to ->Windows->sevices and enable adds .. it will take just time and all done .. or after that restart unity . (ctrl+O (windows)).
Answer by mmortall · May 14, 2018 at 07:40 PM
Just commented out all compilation errors. If you have links to Advertising namespace comment this links. Then Enable Ads in Windows->Sevices. Only after this Unity will install missing DLLs. You will see compilation progress. After it has done uncomment usage of Advertising namespace.
Only this solution works for me. My Unity 5.6.4f1
Your answer
Follow this Question
Related Questions
my app has impression more than 5K but ecpm is too low....How it increases ?? 1 Answer
Advertisement.Initialize() NullReferenceException. 2 Answers
Account balance became zero 0 Answers
How to implement unity ads onto an app? 1 Answer
admob reward ad shows after clicking several times (problem) 1 Answer