# xMax

> The maximum X coordinate of the rectangle.

## Definition

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

```csharp
public float xMax { readonly get; set; }
```

### Remarks

Setting this value will change [Rect.width](/engine/6000.7/script-reference/unityengine/rect/width.md) to preserve [Rect.xMin](/engine/6000.7/script-reference/unityengine/rect/xmin.md).
