Author Topic: iOS Presses not working  (Read 3129 times)

Matt.Hartfield

  • Guest
iOS Presses not working
« on: December 10, 2012, 03:04:36 PM »
So we have a bit of a strange issue.
We have a couple of scenes that have very basic 2D Gui's on them. The issue we have is Buttons on iOS, don't receive OnPress, while on PC and Mac they do.

We have solved the problem by un-checking "Clip Raycasts" from the GUI Camera.  Which upon further inspection does actually make sense, because our panel's Z got set to -499 somehow, when our cameras clip range is -2 to 2 (Default).

So the real issue I guess is the inconsistency. The way it works on iOS seems more correct, but then we need the PC and Mac builds to also behave this way.


Unity 4.0.0f7
NGUI 11 15 2012 package

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: iOS Presses not working
« Reply #1 on: December 10, 2012, 05:54:53 PM »
Well, the obvious solution is to make sure that your panel doesn't go to -499, and it will be consistent without any further modifications.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: iOS Presses not working
« Reply #2 on: December 10, 2012, 06:36:26 PM »
Your panel was likely instantiated the wrong place, maybe outside the UIRoot or on a UIAnchor with a different depth, and maybe that got saved to a prefab. Try to always keep your panels in z=0.

Matt.Hartfield

  • Guest
Re: iOS Presses not working
« Reply #3 on: December 12, 2012, 12:00:22 PM »
Yes, I agree that the panel's should be in the right range. Not disputing that.

The issue is the inconstancy between platforms.
The way something functions on Platform A, should be the exact same on Platform B. In this case Windows/Mac vs iOS.

Our original -499 issue would have been found much easier if this was the case, and I was bringing it to your attention so you can address it for future releases.

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: iOS Presses not working
« Reply #4 on: December 12, 2012, 12:34:15 PM »
Yup, certainly, thanks.