Unity锚点(Anchor)

如果一个RectTransform的parent也是RectTransform,那么孩子RectTransform可以通过各种方式锚定在父RectTransform。

Anchor Min 对应左下角的锚点,Anchor Max对应右上角的锚点。

此时显示了PosX PosY字段是因为4个锚点重合,如果锚点不重合,那么可能显示Left Right,代表到左边锚点和右边锚点的距离。

When the anchors are separated the fields can change partially or completely to Left, Right, Top, and Bottom. These fields define the padding inside the rectangle defined by the anchors. The Left and Right fields are used if the anchors are separated horizontally and the Top and Bottom fields are used if they’re separated vertically.

posted @   dewxin  阅读(203)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
点击右上角即可分享
微信分享提示