UGUI Make Use Of Grid Layout Group

来源:互联网 发布:芒果店长软件下载 编辑:程序博客网 时间:2024/05/21 11:31
1.Buttons
Grid layout Group,Set group of Buttons vertical by one column,
but The Size is hard to arrange.So

1>Create new GameObject in canvas with component of rect transform and Grid layout Group.
2>Then Create several Buttons under the Gameobject
3>
scale the gameobject smaller to available size 
4>
then turn off the component Grid layout Group,then arrange the rect transform to adapt to the shape of Grid group of buttons,center to it's center.
5>
move the gameobject to the available position
6>
then put the component Grid layout Group of the GameObject 
to the target panel.
7>Arrange the anchors of each button to adapt to the target rect transform.
0 0
原创粉丝点击