# ClampToBounds(RectInt)

> Clamps the position and size of the RectInt to the given bounds.

## Definition

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

```csharp
public void ClampToBounds(RectInt bounds)
```

### Parameters

**** (\[RectInt]\(/engine/6000.0/script-reference/unityengine/rectint)): Bounds to clamp the RectInt.
