Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bitwalk

Pages: [1]
1
NGUI 3 Support / Don't understand how UIGrid works with an anchor?
« on: May 28, 2013, 08:52:33 AM »
Hello!

I'm trying to get an UIGrid to be centered inside a panel but I can't seem to get it to work.

Here is my object tree:
GameObject (With UIAnchor set to bottom)
  UIPanel (with clip region (pink box))
    UIGrid (with two buttons in it and an UIAnchor set to center and with the parent UIPanel set as parent container)
      Button1
      Button2

I've attached a screenshot of how it looks. It appears as if it's centering on the center of the first button in the grid instead of the whole grid.

Any tips on how to get the grid centered appreciated, or if there's some other method of achieving this. I can't do manual centering since I want it to recenter if I change the number of buttons in the grid.

Thanks!
--Andreas

Pages: [1]