# SetLocalLeft(float, bool)

> Moves the left edge of this RectTransform to the specified position in its parent's coordinate space.

## Definition

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

```csharp
public void SetLocalLeft(float value, bool preserveSize = true)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The target x coordinate for the left edge, in the parent's coordinate space.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): When true (default), the element translates so the left edge reaches `value` while width is unchanged. When false, only the left edge moves: the right edge stays fixed and [RectTransform.sizeDelta](/engine/6000.7/script-reference/unityengine/recttransform/sizedelta.md) is adjusted to match the new width.

### Remarks

When `preserveSize` is true, adjusts [RectTransform.anchoredPosition](/engine/6000.7/script-reference/unityengine/recttransform/anchoredposition.md) so that [RectTransform.GetLocalLeft](/engine/6000.7/script-reference/unityengine/recttransform/getlocalleft.md) returns `value`; the element's size ([RectTransform.sizeDelta](/engine/6000.7/script-reference/unityengine/recttransform/sizedelta.md)) and right edge are not affected. When `preserveSize` is false, the right edge remains at its current position and the width is resized to reach `value`.

Additional Resources: [RectTransform.GetLocalLeft](/engine/6000.7/script-reference/unityengine/recttransform/getlocalleft.md), [RectTransform.SetLocalRight](/engine/6000.7/script-reference/unityengine/recttransform/setlocalright.md).
