SetPivotAndAnchors(Vector2)
Sets the pivot, anchorMin, and anchorMax to the same value.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public void SetPivotAndAnchors(Vector2 position)
Parameters
The normalized position to assign to the pivot, anchorMin, and anchorMax.
Remarks
When RectTransform.pivot, RectTransform.anchorMin, and RectTransform.anchorMax are all equal, the RectTransform.anchoredPosition directly expresses the element's position as a normalized fraction of the parent rect. This is the most predictable coordinate model for programmatic layout. The RectTransform.sizeDelta and RectTransform.anchoredPosition are not modified.
Additional Resources: RectTransform.SetAnchors.