Unity 5.6 - Problem with Unity Ad (not showing ads)
I have a problem with Unity Ad. Before updating Unity to 5.6, Ad was working very fine in my game. But now, I can't make it work at all. I re-imported Unity Ad extension, checked if "builtin Ads extension" and "test mode" were enabled, but nothing happened. Uninstalled Unity and return to the previous version I had (5.5.2f1), but with no results. And the console show me no errors. I didn't touch anything in my code or game itself... Anybody knows if there's any problem with Ads ? Thank you very much for your answers !!
Answer by NightmaresDev · May 26, 2017 at 06:01 PM
Your problem might be the same as mine...
It's that whenever you start the game The Unity Ads are not able to initialize in time, therefore, you get a message in the console when starting the game in unity.
UnityAdsEditor: Initialize("GameID", False);
UnityEditor.Advertisements.UnityAdsEditor:EditorOnLoad()
If it says false = it won't works!
If it says true = It supposedly should work!
It was true the first time I integrated ads! But once I Updated my game to a new version it turned into false.
Hi, NightmareTD. Actually, my console don't show any errors (in fact, it doesn't show me nothing), so I can't figure out what's the problem. Before the Unity version update, the console showed me that UnityAd was initialized. But now, I get no messages. $$anonymous$$aybe, my problem is the same as yours (despite my defective console). Did you solved the problem ? Thank you for the answer !!
Answer by Ricardopp21 · Jul 16, 2017 at 01:14 AM
ANSWER:
I finally resolve my problem with Unity Ads... After trying different things, I did the following:
https://unityads.unity3d.com/help/monetization/2.0-upgrade-guide-unity
Before updating Unity to 5.6, I didn't needed that script, but with it, Ads are now working... So...
I hope all of you can resolve your problems too with this !!
I have the same issue. Your link gives: 404 Whoops. Looks like this page doesn't exist.
Hi !! Yes, the link is broken now... But, in summary, what I had to do was to disable Unity Ads from the Services tab, and activate it through a script. It was the only way to solve it. I hope it helps you !! Regards !!
I copy the content of the script to activate Unity Ads. Where it says "put your Android ID" or "put your ios ID", you have to put your respective ID's.
Blockquote
using UnityEngine; using UnityEngine.Advertisements;
public class UnityAdsInitializer: $$anonymous$$onoBehaviour { [SerializeField] private string androidGameId = "put your Android ID", iosGameId = "put your ios ID";
[SerializeField] private bool test$$anonymous$$ode;
void Start () { string gameId = null;
if UNITY_ANDROID
gameId = androidGameId; #elif UNITY_IOS gameId = iosGameId; #endif
if (Advertisement.isSupported &&! Advertisement.isInitialized) { Advertisement.Initialize (gameId, test$$anonymous$$ode); } } }
Blockquote
Your answer
Follow this Question
Related Questions
Disabling button when Ads not available? 0 Answers
disable ads admob with iap 0 Answers
Trouble with closing Unity 5 ads 0 Answers
I can't add google play store id to my game, any help ? 0 Answers