# SetPivotAndAnchors(Vector2)

> Sets the pivot, anchorMin, and anchorMax to the same value.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public void SetPivotAndAnchors(Vector2 position)
```

### Parameters

**** (\[Vector2]\(/engine/6000.7/script-reference/unityengine/vector2)): The normalized position to assign to the pivot, anchorMin, and anchorMax.

### Remarks

When [RectTransform.pivot](/engine/6000.7/script-reference/unityengine/recttransform/pivot.md), [RectTransform.anchorMin](/engine/6000.7/script-reference/unityengine/recttransform/anchormin.md), and [RectTransform.anchorMax](/engine/6000.7/script-reference/unityengine/recttransform/anchormax.md) are all equal, the [RectTransform.anchoredPosition](/engine/6000.7/script-reference/unityengine/recttransform/anchoredposition.md) 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](/engine/6000.7/script-reference/unityengine/recttransform/sizedelta.md) and [RectTransform.anchoredPosition](/engine/6000.7/script-reference/unityengine/recttransform/anchoredposition.md) are not modified.

Additional Resources: [RectTransform.SetAnchors](/engine/6000.7/script-reference/unityengine/recttransform/setanchors.md).
