Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: rookie_coder on February 18, 2014, 05:33:39 PM

Title: Anchoring Board Game Object to Panel
Post by: rookie_coder on February 18, 2014, 05:33:39 PM
I have a 8*8 Game Board (GameObject). It is made up of Cubes. I want the Game Board to be contained and anchored to a Panel, so that when the Panel resizes based on the platform, Web or mobile, the GameBoard resizes accordingly. Is there a way to do this in NGUI? Any examples?

Thanks
Title: Re: Anchoring Board Game Object to Panel
Post by: ArenMook on February 19, 2014, 12:26:34 PM
Panel has no rectangle unless you enable clipping. Furthermore you can't anchor game object. You can only anchor widgets.

Easiest thing to do in your case is to just write a custom script that will position its children based on some dimensions of your choice by splitting them into rows and columns.