Author Topic: Two problems. One 2.0.7 specific.  (Read 2648 times)

MaskedPixel

  • Guest
Two problems. One 2.0.7 specific.
« on: May 24, 2012, 09:31:48 AM »
Upon building in any platform I get this error with 2.0.7:

  1. Assets/NGUI/Scripts/UI/UIPanel.cs(149,56): error CS0103: The name `flags' does not exist in the current context

So to build I have to comment that line out as flags doesn't seem to be used for anything other than the editor anyway.


Second Problem.  Buttons again.

I have a button that works in the editor, web player, PC, and Mac.  But when I build for iOS, the events do not fire.  The button does not change color/size/offset.  All other buttons in the UI work universally, and there are quite a few.

To try to resolve this issue I have:

1. Upgraded from 2.0.4b to 2.0.7.

Note that all of the efforts I am describing below have been done on _both_ versions of NGUI that were tested.

2. Rebuilt the button from scratch using both the normal way to build a button and the work around I described here: http://www.tasharen.com/forum/index.php?topic=462.0
3. Changed the z-value of both the collider and the Button itself to be in front of and behind it's parent.
4. Ensured that there are no scripts attached to the button other than those that come with NGUI.
5. Determined that the button is in fact identical in all settings (except for it's y value and the animation it plays) to another button on the same panel.
6. Hit the button with a hammer on both my ipad and iphone.

Please help...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two problems. One 2.0.7 specific.
« Reply #1 on: May 24, 2012, 10:39:33 AM »
I just fixed the error, I introduced it by accident in 2.0.7b an hour ago. 2.0.7c fixes it.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two problems. One 2.0.7 specific.
« Reply #2 on: May 24, 2012, 10:49:43 AM »
The reason why a button wouldn't work can be one of a couple of things.

- Its collider may not be correct, Alt+Shift+C recalculates it.
- It may be covered by another collider. Adjusting Z to bring it forward (negative) would fix it.
- UICamera may not have "use touch" chosen, so touch input won't work.

MaskedPixel

  • Guest
Re: Two problems. One 2.0.7 specific.
« Reply #3 on: May 24, 2012, 01:56:35 PM »
After performing your recomendations in addition to the steps I took previously described in the op several times and quite a few other things, it still didn't work on ios.

What ended up fixing it was:
I deleted the project on my mac.
Pushed the project that I had on my pc(which was cloned from my mac version to test if it worked on a pc build).
Cloned the pc version on my mac.
Voila.  It works.

So, I cloned the mac version, to windows, then cloned the windows version to mac before it worked.

EDIT:  To be more clear.  The windows/mac versions are simply local repositories.  I am using bitbucket for my master.

EDIT: EDIT:  I have no idea why this would have fixed the problem.
« Last Edit: May 24, 2012, 01:58:47 PM by MaskedPixel »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two problems. One 2.0.7 specific.
« Reply #4 on: May 24, 2012, 02:19:18 PM »
Yeah, sounds strange.