- Home /
iOS iAd causing hiccups on load
Hi!
I'm using the standard code (converted to JS) from Unity for putting up iAd. It worked on the first try no problem, but now my game hiccups each time a new banner is either loaded, or if there is an error loading an ad (seen through xcode output window when debugging, although it happens with a release build not run through xcode too). When I don't run the supplied code my game is pegged at 60fps, even with adbannervew it is 60fps until a new ad pops up. The hiccups are VERY noticable, it probably drops to 5fps during these times. Tested device is a 4th gen iPod touch 32gb.
The ads run fine on my iPad 2 and iPhone 5c, so I'm contemplating to not allow ipod 4g, but would rather allow this device.
Here is the code I am running (again, supplied by Unity website, converted to JS):
private var banner : ADBannerView = null;
////////////////////////////////////////////////////////////////
function Start() {
banner = new ADBannerView(ADBannerView.Type.Banner, ADBannerView.Layout.Top);
ADBannerView.onBannerWasClicked += OnBannerClicked;
ADBannerView.onBannerWasLoaded += OnBannerLoaded;
}
////////////////////////////////////////////////////////////////
function OnBannerClicked()
{
Debug.Log("Clicked!\n");
}
////////////////////////////////////////////////////////////////
function OnBannerLoaded()
{
Debug.Log("Loaded!\n");
banner.visible = true;
}
I'm not doing anything else iAd related, there is one gameobject that runs this script and does a DontDestroyOnLoad, that's it. I'm not sure if attaching any other game code would help, so let me know if you think something I am doing in my game could be causing something like this.
Thanks a million in advance!
Answer by MRCty · Apr 17, 2014 at 09:49 AM
Hello, I have the same issue. I also tried with Prime31 iAD plug-in but I get the same problem. I think I get the problem when iAD load new banner. I'm looking for a solution but I've not one until now...
Your answer
Follow this Question
Related Questions
Stuttering / performance issue with certain JS scripts 0 Answers
Game stuttering only in iPhoneX and above. Not a performance issue. 0 Answers
Different calculations/math results between Unity editor and iPhone ? 1 Answer
Performance and testflight in an iphone app 0 Answers
How do I get high smooth FPS in Unity??(Improve Fillrate) 1 Answer