LocalPosition anchoredPosition

anchoredPosition:The position of the pivot of this RectTransform relative to the anchor reference point.
The Anchored Position is the position of the pivot of the RectTransform taking into consideration the anchor reference point. The anchor reference point is the position of the anchors. If the anchors are not together, Unity estimates the four anchor positions using the pivot placement as a reference.

LocalPosition:
Position of the transform relative to the parent transform.
If the transform has no parent, it is the same as Transform.position.

LocalPosition:针对的对齐方式是居中对齐,Anchors min(0.5,0.5) max(0.5,0.5),修改锚点对齐方式对localposition无影响,始终在固定的位置,修改中心点(Pivot)有效。

anchoredPosition:与锚点关联的设置方式,直接作用于posX posY posZ。

sizeDelta:距离锚点的距离,如果锚点min max相同则和长宽相等,如果不相同,则为两端到两锚点距离相加


image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容