Author Topic: New NGUI  (Read 4837 times)

johnessy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 29
    • View Profile
New NGUI
« on: October 10, 2014, 06:44:53 AM »
Hi there,

I have actually used NGUI for a long time and only just downloaded the latest release.

I am used to anchors etc taking care of everything for me, from pos, to scale.

I cant for the life of me get my objects to scale properly with this new system.

I used to follow this structure.

Panel,
GO,
Anchor
Sprites etc

But i have read that the anchor system is now built in.

How do you use it correctly so that i can position my elements the way i used to and also have it scale properly?

Thanks

johnessy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 29
    • View Profile
Re: New NGUI
« Reply #1 on: October 10, 2014, 01:52:58 PM »
bump.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: New NGUI
« Reply #2 on: October 10, 2014, 07:02:24 PM »
Well, your panel assumes the size of the screen, if there's not clipping area defined, so you can base your things on that. Remember to check offset if you want to more the panel around, or things will stay anchored to the screen even though you move the transform.

Each widget has a dropdown anchor where you can set each side of the widget to anchor to a side of "something else", that can be a Widget, a panel or anything else that derives from UIRect.