Author Topic: 3.6.6 Broke layout  (Read 4801 times)

JACLEMGO

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
3.6.6 Broke layout
« on: July 01, 2014, 01:02:42 PM »
My menu was working perfectly, upgraded to version 3.6.6, now the panel with the dimension are very high up If I add anchors to an object, the object gets offset with something like -26546846.
What could have caused this, and how can I fix this ASAP!!!!


JACLEMGO

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: 3.6.6 Broke layout
« Reply #1 on: July 01, 2014, 01:04:52 PM »
Note, all the panels are offset higher up, but the transform position is 0,0,0

JACLEMGO

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: 3.6.6 Broke layout
« Reply #2 on: July 01, 2014, 01:09:44 PM »
My main NGUI object's y = 100, if I reset this to 0, it fixes the problem. This never used to be an issue.
Please fix ASAP, I cant use the menu if its at 0,0,0.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: 3.6.6 Broke layout
« Reply #3 on: July 01, 2014, 02:13:33 PM »
We're going to need more to go on that "it's broken, please fix!"

Can you make a repro case as a .unitypackage of your issue? There's likely something in your hierarchy that's set up weirdly.

JACLEMGO

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: 3.6.6 Broke layout
« Reply #4 on: July 01, 2014, 03:26:49 PM »
@Nicki,

Im a bit pushed for time on the project, so for now Im just sticking to the version I have, which doesnt offset the panels. Once I have some time, I will send strip away everything except NGUI and send it through.

The hierarchy is setup the same as follows:
Main NGUI object
anchors for each position (top left, top center, bottom middle, etc)
underneath each are a number of panels.

If I set the position of the main NGUI to 0,0,0.
the panels are in the correct places.
by default, the object is at 0,100,0, at this position the panels are much much higher than the NGUI object and the anchors.

Adding a new anchor and panel, causes the same issue, but only in 3.6.6


Darkmax

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 93
    • View Profile
Re: 3.6.6 Broke layout
« Reply #5 on: July 01, 2014, 04:36:07 PM »
I think is because you are using UIAnchor, and the new changes do not go well with the old anchor system, that a lot of people is still using on their projects, I haven't update ngui because of this, because in some projects I'm still using old stretch and anchor systems

Yukichu

  • Full Member
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 8
  • Posts: 101
    • View Profile
Re: 3.6.6 Broke layout
« Reply #6 on: July 01, 2014, 07:00:33 PM »
Aren was nice enough to post the old UIAnchor to use, which I haven't tried yet.  I guess I'm just going to convert the anchors I have, which will be good in the long term.

http://www.tasharen.com/forum/index.php?topic=10175.msg47801#msg47801 was the post with the UIAnchor.cs file.

Ferazel

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 150
    • View Profile
Re: 3.6.6 Broke layout
« Reply #7 on: July 02, 2014, 12:15:24 PM »
I upgraded to 3.6.6 and it was completely borked as well. I'll try to go through and try to update all of my UIAnchors to the new anchoring system.

I think the most important thing about the old UIAnchor system was that it could be used for any game object in addition to UIWidgets. Now I have to create a 90% transparent sprite or other UIWidget in order to get some of my UI anchored correctly. This is not always desirable depending on the organization structure of your UI hierarchy. I have a lot of empty controller objects that are parents to a lot of internal sprites/textures/labels and putting a texture or other widget at the top can create some undesired color tinting mechanics. I wish there was a way to include an "empty" UIRect that we could use to anchor widgets.
« Last Edit: July 02, 2014, 12:32:03 PM by Ferazel »

ryan

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 90
    • View Profile
Re: 3.6.6 Broke layout
« Reply #8 on: July 02, 2014, 12:31:55 PM »
I wish there was a way to include an "empty" UIRect that we could use to anchor widgets.

That's exactly what UIWidget does.

Ferazel

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 150
    • View Profile
Re: 3.6.6 Broke layout
« Reply #9 on: July 02, 2014, 12:42:49 PM »
That's exactly what UIWidget does.

Thank you for letting me know about that component. I figured it was only supposed to be used internally for inheritance.  :-[  I'll start the process of updating my GUI to the anchoring system and see if I run into any other problems.

Thanks again.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3.6.6 Broke layout
« Reply #10 on: July 03, 2014, 04:34:42 AM »
ALT+SHIFT+W is the shortcut, for reference. I mention it quite a few times in the tutorials. ;)

I'll un-break the UIAnchor in Friday's update, but still -- legacy component, deprecated a while ago... its testing stopped last year, so was bound to get broken and go unnoticed at some point.