- Home /
Tapping iAd via AdMob is triggering RANDOM clicks on sprites in my scene.
Hi everyone.
I'm experiencing a very strange error that I can't seem to figure out.
I have a 2D game with sprites on screen, with 2d Box colliders on them, and simple code like this on each sprite:
On the SCORES button:
void OnMouseUp()
{
gameController.TriggerScores();
}
or on the reset button
void OnMouseUp()
{
gameController.ResetLevel();
}
etc. Just really simple function calls.
I am embedding ads in my game - along the bottom of the screen. I am using the AdMob for unity plugin (for iOS / Xcode), and embedding all the proper .m and .h files properly, as per the admob instructions. I don't think there's an issue with how I have things hooked up. In AdMob, I'm using Ad Moderation to show both AdMob and iAds. The ads are all showing up fine in game.
Here's the issue: When you TAP on an iAD ad, it often, instead, triggers the OnMouseUp code on my objects on screen.
Yes, that's right, clicking on an iAd ad, instead triggers the various clicks on sprites in my game. It's totally random. Sometimes the iAd is clicked successfully and shows up just fine, but 50% of the time, some random tap event is triggered elsewhere in my game.
I'm at a loss.. I don't know what could or would cause this. It is ONLY with iAds - the AdMob ads click just fine. I don't even see how iAd could "reach into" my game, which it is on top of, and trigger clicks within items in the game.
anyone have any ideas?
Was you able to solve the problem? I've got the same behavior with ngui and iAd banner
having the same problem with Admob and iad mediation... random clicks happens when you click on banner. How did you solved this problem ?
I had this problem and reported it to admob. If you debug draw all the touch positions you will see it go wrong when you are int he top 10% (ish) of the screen (presumably the banner height). It will do this regardless of where the banner is positioned. ie. position at bottom and error still occurs at the top. I tried to repeat on their test version in helloworld demo and couldn't. So I transferred the hello world files into my app (replacing the ones from their suggested installation) and it went away. To be honest I never got to the bottom of what was causing it because I spent soooooo long trying to fix/repro it. $$anonymous$$y advice...try and use their helloworld files.
Oh, and don't even get me started on why it is so hard to implement admob 7 into unity!!!!?!? grrr...
Answer by efge · Feb 09, 2016 at 11:17 AM
Same issue with Unity 5.3.2 and standard ADBannerView.
Solved it by making the banner visible after the splash screen (Application.isShowingSplashScreen).
Your answer
Follow this Question
Related Questions
Cannot add menu item 'Assets/External Dependency Manager/Version Handler/Update' for method ..... 1 Answer
iAd fallback to AdMob 2 Answers
AdMob iOS and Android 1 Answer
Merge android manifest with Admob 0 Answers
problems with iAD banner 1 Answer