Author Topic: NGUI issues with Unity 4.6.x  (Read 3168 times)

TGillissie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
NGUI issues with Unity 4.6.x
« on: April 28, 2015, 10:34:34 PM »
I noticed that NGUI is using UNITY_4_5 constants to control some things in the Options, which aren't working properly when using Unity 4.6.x. I can fix it locally by fixing the logic in those places, but maybe a NGUI update is due?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI issues with Unity 4.6.x
« Reply #1 on: April 29, 2015, 09:12:16 PM »
What are you referring to?

TGillissie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: NGUI issues with Unity 4.6.x
« Reply #2 on: April 30, 2015, 12:17:48 AM »
Two specific things that don't take UNITY_4_6 into consideration, so they don't work properly in 4.6.x...

NGUIEditorTools.HideMoveTool()
UIWidget.showHandles

There may be more, but those are the two things I ran into trouble with that drew my attention to it.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI issues with Unity 4.6.x
« Reply #3 on: April 30, 2015, 06:12:31 PM »
Both of those take Unity 4.6 into consideration. It uses older code for Unity 4.5, and newer for 4.6+, so I am not sure what you mean here. Unity 4.6 has the Rect tool already, so NGUI uses it instead of the move tool like in 4.5 and earlier.

TGillissie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: NGUI issues with Unity 4.6.x
« Reply #4 on: May 01, 2015, 03:13:14 PM »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI issues with Unity 4.6.x
« Reply #5 on: May 02, 2015, 10:01:16 PM »
You simply moved the code from rect tool back to move tool.

You should have been using the Rect tool in Unity 4.6+

TGillissie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: NGUI issues with Unity 4.6.x
« Reply #6 on: May 04, 2015, 11:54:15 AM »
Why not have the logic the way I changed it to so we don't have to manually switch tools?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI issues with Unity 4.6.x
« Reply #7 on: May 05, 2015, 10:07:23 PM »
Because the Rect tool is meant for UI. Unity's UI also uses this tool. It makes sense to use it when it's available, isn't it? I'm confused why you would want it otherwise.