Author Topic: UITable position modified on run when child of anchor  (Read 4397 times)

Tiktaalik

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 39
    • View Profile
UITable position modified on run when child of anchor
« on: May 08, 2013, 05:39:50 PM »
Hello. I'm very new to NGUI and I'm trying to figure out how best I should best organize my UI elements in a panel using anchors. I want to anchor everything offset from the top left side and I've been following Example 1 in NGUI Free 2.0.7c.

My current setup is as follows:

UI Root
--> Camera
-->--> Panel
-->-->--> Anchor
-->-->-->-->UITable
-->-->-->-->-->Label

The odd thing I've noticed is that I can organize everything such that it makes sense in the editor, but when I run my project, the transform of the UITable is overridden and changes from 0,0,0 to 19.33334, -270, 0 and is part way down the screen. The Label is top left aligned with a transform of 0, -10, 0.

Poking around I've noticed that the transform values of my Camera, Panel, Anchor all seem to occasionally get modified when move a bunch of things around and then I run the game. I'm wondering what is going on here, how these values change, and what am I supposed to do? Is there a best practice of moving certain things in an order? I'd guess that the size of my Panel should be the size of the screen I want? What about the size of every other element such as the Anchor?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITable position modified on run when child of anchor
« Reply #1 on: May 08, 2013, 05:43:58 PM »
Free version doesn't come with support, Tik.

Tiktaalik

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 39
    • View Profile
Re: UITable position modified on run when child of anchor
« Reply #2 on: May 08, 2013, 05:47:54 PM »
Didn't notice that but that's reasonable.  :)

I was planning on purchasing the full version, so I'll do that, and try to repro the issue on the latest version.