Can I show ads from any ad network inside the Editor?
If not, then how do I check that the request was succesful in Editor? You can give an example from any SDK.
When using admob in the unity editor you can not actually view the real ad units or the test ad units. Unity will give you a log message saying that the ad was run, but it will not call the reward call back. You can implement platform specific code using
#if UNITY_EDITOR
your reward call back code goes here
#endif
this way you can trigger the reward call back in unity without watching the ad so the program will still function properly.
You must build the program to actually view the test ads and make sure all the callbacks are working.
Related
Unity Ads usually take around 10 seconds to load ads. I have a functionality in my game to reward gems after watching ads. Currently, I immediately call the Load Ad function once an Ad is played using the Show function. Even then, I cannot play ads continuously. Is there a method to do multiple calls of Load to load ads faster?
I execute the Load function immediately after successful display of the ad. But that still doesn't help.
P.S: I use the unity ads Legacy system for monetization.
I'm trying to implement AdGamer SDK in my Unity game. I'm calling AdGamer.InterstitialAds.Show() but it doesn't show anything. Please help
It could be for several reasons:
The interstitial hasn't yet been loaded. So, check AdGamer.InterstitialAd.IsReady() before trying to show an interstitial ad
The SDK hasn't yet been initialized. Make sure to call AdGamer.InitWithGameToken(YOUR_GAME_TOKEN); before calling anything else in the AdGamer SDK. For example, you can do that in Awake() method in a script which you put on some GameObject in the first scene your game loads. Or you could create a static method with the attribute [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
to make it run at game launch before anything else. It can be in any script and there you'd initialize the SDK. The game token you get when you register your game in the AdGamer publisher console.
The initialization of the SDK may take several seconds (e.g. it may need to auto-update), so if you're trying to show an interstitial very early (right at game launch, before the starting screen) the call will likely fail. For such cases you may want to check AdGamer.IsInitialized before doing anything else.
// in any script
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
public static void InitializeAdGamerBeforeEverything()
{
AdGamer.InitWithGameToken(YOUR_GAME_TOKEN);
}
// elsewhere in code
if (AdGamer.IsInitialized && AdGamer.InterstitialAd.IsReady())
{
AdGamer.InterstitialAds.Show();
}
There is no internet connection or some firewall or other settings on your machine prevent the game from connecting with AdGamer servers
Note that the "no_fill" case doesn't exist in AdGamer: it should return at least a cross-promo ad even if no commercial ad is available in your country at the moment.
Also, please be sure to check the SDK documentation (it also comes as a PDF file inside the unitypackage)
I am working on a Unity game that needs to be monetized with Heyzap SDK. I integrated the latest SDK that had some issues earlier and its fixed.
Now I want to know whats the best possible way to preload or cache interstitial and reward ads before calling Show method.
In doc, it says, Fetch right after initializing Heyzap SDK.
What if I have 3 different placements in game ? ie, three different tagID's.
I know that I can make use of HZInterstitialAd.Fetch("tagID1") and so on...
I just want to know that I am doing it in the right way....
So these are my questions.....
1) I am calling HeyzapAds.Start("xxxxxxx") in Awake() of one of my cs scripts. Is Awake() the right function to initialize Heyzap SDK ?
2) Can I call Fetch method subsequently like below. Because I want all these 3 ads with different tagids to be preloaded or cached. Will it cause any network bottleneck because of the subsequent web service calls ? Is it safe to load Ads like this ?
HZInterstitialAd.Fetch(tag1)
HZInterstitialAd.Fetch(tag2)
HZInterstitialAd.Fetch(tag3)
3) In my game, as soon as the user launch the app or when user hard close ( remove from memory ) and launch the app again, I have to show an Ad ( bootup ad ). To achieve this, I used the below code, but it's not working. Could you let me know how to show bootup Ad or show an AD right after initializing Heyzap SDK.
Is there any delegate available to check if the SDK initialized before I attempt to call Show method or Should I rely on Fetch and its respective interstitial or incentivized delegates ?.
HZInterstitialAd.Fetch(tag1)
HZInterstitialAd.Fetch(tag2)
HZInterstitialAd.Fetch(tag3)
HZInterstitialAd.ShowWithOptions(option);
I also tried calling from Android's Activity's Resume and Start to Unity's function that trigger Heyzap interstitial Ad. But its not working either.
Note: If I attempt to call Show after a small pause say 1 or 2 seconds, all calls are working. It seems that calling Show right after initialization is not working. It needs some time to search and Fetch Ads from available networks ?. So whats the recommended approach to show BOOTUP Ad ?
For somehow I don't get Chartboost interstitial loaded every time, asked them and as most answers:"no more of the interstitials available at the time you're testing in the network satisfy the conditions......". So now I use revmob also. The question I have: how to check if Chartboost is preloaded? my code so far:
if(Chartboost.hasInterstitial(CBLocation.Default))
{
Chartboost.showInterstitial(CBLocation.Default);
}else {
revmob.ShowFullscreen();
}
I only receive revmob interstitials. Is my checking condition ok? Saw something about delegates but I am not sure how to use them.
Yes you checking condition is OK.
For using delegates read this Chartboost Documentation on delegates in Unity3D. I think it has a pretty good explanation on how to implement delegate methods. Also I will HIGHLY recommend that you do implement these delegate methods as they will help you not only with displaying ad status logs but also identifying problems regarding Ad display.
EDIT for future reference:
For example:
Implementing Chartboost.didCacheInterstitial and Chartboost.didFailToLoadInterstitial delegates will tell you if and when an interstitial ad was loaded or failed. The fail delegate(s) also sends an error as parameter so you would know why the cache was failed.
If the delegates are not being called then there is an issue with your chartboost SDK integration in your project inside unity. In that case try re-importing the chartboost sdk and check you chartboost dashboard for issues. One of the most common issues >> make sure that there is an active ad campaign linked to your in chartboost dashboard. To setup an ad campaign follow: Start a Publishing Campaign
What you recommend for advertising platform not in the USA.
iAd is ot seding ads outside the USA.
I'v tried AdMob, ad it also seems not to work. Most of the time it fails to show up an and, ad when showing it shows only one ad again and again (some hotel booking)
Any Idea?
Have you tried Google Mobile Ads?
I would recommend not sticking to one platform as such. You have a particular service fill in ads but if that doesn't have ads for you then, query some other platform, if that doesn't the next one.
# Pseudo-code
if GoogleMobileAds:
# Code to use Google Mobile Ads
else if iAd:
# Code to use iAd
else if AdMob:
# Code to use AdMob
else:
# Your own promotion or whatever is your last option
Edit: You may have to handle transitions and animations on your own. You may also have to create a new AdMobView for every ad request you make. Following is a quote from this Google Groups discussion.
If you require feedback from the SDK for every ad request, we suggest
that you create a new AdMobView for every ad request you make. If
using this particular method, you will have to handle view transitions
(and animations) between the two ads yourself, as well as cleaning up
each AdMobView object when you no longer need it. If you require feedback from the SDK for every ad request, we suggest
that you create a new AdMobView for every ad request you make. If
using this particular method, you will have to handle view transitions
(and animations) between the two ads yourself, as well as cleaning up
each AdMobView object when you no longer need it.
I would recommend Smart AdServer, because in my opinion, this is the best all-in-one mobile adserving tool.
It's both an adserver (where you can program your own ads on inventory you have sell by your own) and a mobile advertising platform ( it's connected to main global adnetworks through backfills. And most of the are compliant with backfills, this is not the case for every ad server, I'd recommend that you check.
It is just an SDK (compatible i0S 5 and less), also compatible with iPad.
Programming is really easy, and formats are really cool, innovative, so you can get high CPM from them (you can check by your own downloading the iPhone app, or on this gallery.
You can monitor campaigns in real time, directly in an iPhone app.