Unity之UGUI表格布局

    好久没写博客了,最近挺忙的。这里简单介绍一下表格布局的层级关系,作为备用。

    --Image + ScrollRect + Mask (滑动组件 + 区域遮罩)

            --Image + Grid Layout Group

                --Item

 Mask所在物体的Image组件Source Image选择UIMask,Scroll Rect的Content拖入Grid Layout Group所在物体的RectTransform,选择Horizontal,Vertical。

Content Size Fitter,每项都有三个可选值

Unconstrained Don't perform any resizing.
MinSize Resize to the minimum size of the content.
PreferredSize Resize to the preferred size of the content.

以此可作为多种窗口UI的布局层级关系。

猜你喜欢

转载自blog.csdn.net/LightInDarkness/article/details/79920758