Author Topic: How can I achieve anchor the parent which has multiple widget childs?  (Read 1752 times)

kenshin122

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 2
    • View Profile
I dont know how to do the parent anchoring which has multiple widgets.

I have one UIPanel and inside there is multiple widgets. But I want those widgets to be positioned at top right corner. But to achieve this effect, I have to manually set all of widgets anchor to top right corner and those tasks are really exhausting.
 What I want is just anchor the parent to top right corner and make rest of widgets follow their parent. But in UIPanel, the anchor option is disabled.
 How can I achieve this without customizing the NGUI code.
 Any ideas?
 

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How can I achieve anchor the parent which has multiple widget childs?
« Reply #1 on: December 12, 2014, 11:48:23 PM »
So do just that. Create a widget container -- ALT+SHIFT+W. Set its pivot to top-right, anchor it.

All other widgets will go underneath it. You don't need to anchor them.

kenshin122

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: How can I achieve anchor the parent which has multiple widget childs?
« Reply #2 on: December 15, 2014, 03:40:11 AM »
So do just that. Create a widget container -- ALT+SHIFT+W. Set its pivot to top-right, anchor it.

All other widgets will go underneath it. You don't need to anchor them.

Thanks. This worked for me!