- Home /
Banner ad not working
I followed the banner ad code to a T here: https://unityads.unity3d.com/help/unity/integration-guide-unity#banner but the last line doesnt work because the Banner is not part of Advertisement. So I took out the Banner word, and the code works runs but the banner shows as a regular ad when I play the game, and when I build it there is no ad at all. Please help! Ive been trying to fix this all day.
Answer by Cerbion_ · May 29, 2019 at 11:08 AM
Have you made sure to add the Monetization SDK 3.1.0 via the Asset Store? Just enabling the native Service won't be able to support Banners since they are pretty new in Unity Ads.
Once imported to your project you can enable the SDK with:
using UnityEngine.Advertisements;
in the appropriate script(s), after which you can use Advertisement.Banner
Answer by Gothrond · Jun 04, 2019 at 10:19 PM
I was wondering if you have been able to solve problem of Advertisements.Banner.Show(). I am having the same problem, and I don't want to do the above answer (import Monetization) because docs say not to if not doing Personalization and I'm afraid it will cause problems. Did you find another solution? I really would like to fix this because my game is done except for this problem, and I can't make any money without fixing it. Unity really should make the money-making aspect of the Engine much easier to integrate because not everybody is making games for no money.
I asked unity ads support with my specific code and question. I ended up needing to update a newer version of Unity along with the new $$anonymous$$onetization sdk to get my banner working. I am not sure how the personalization part is different, but here was the full response I got:
Banner requires Unity Ads 3.0+, hence first pls try clean your editor Ads SD$$anonymous$$ and re-import as below: 1. Remove ancient Ads SD$$anonymous$$ from Package $$anonymous$$anager if any Unity editor > Window > Package $$anonymous$$anager > Uninstall Advertisement package 2. Disable Ads Service if activated Unity editor > Window > General > Services > Turn Ads service as OFF 3. Import latest Ads asset package Close and reopen Unity editor > Window > Asset Store > Search and import "Unity $$anonymous$$onetization 3.0.3" Above should make sure you only have the latest ads SD$$anonymous$$ imported and no package conflicts.
Second, pls use only one ads API through your project since $$anonymous$$onetization and Advertisement will conflict with each other. Since you use Banner, pls use Advertisement API though your project.
Third, pls use test$$anonymous$$ode as true for testing since banner may not always fill in some countries.
As for code, pls check below banner sample for reference, you can replace with your own Unity game id and banner placement id. https://www.dropbox.com/s/zqfghnwb7dlt59s/Editor%20banner%20sample.zip?dl=0
Hi Gothrond, I am implementing Unity banner ads and I am having the exact same issue i.e. I don't want to implement $$anonymous$$onetization SD$$anonymous$$ but the error I am having is UnityEngine.Advertisement does not contain a definition for Banner where I am calling Advertisement.Banner.Show(). Ads package is latest and I have done everything exactly according to the documentation.
Have you solved this issue? Thank you
You need to use advertisement 3.0+, I am using the 3.2.0 and it's working, at least in test mode.
Your answer
Follow this Question
Related Questions
Google banner Ads display problem 0 Answers
Banner Ad Without Button 0 Answers
Admob Banner Ads not shown but are clickable 1 Answer
Can we show 3d ads in the game like on billboards? 0 Answers
banner ads size 0 Answers