# ClampToBounds

> Clamps the position and size of this bounding box to the given bounds.

## Definition

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

## ClampToBounds(BoundsInt)

Clamps the position and size of this bounding box to the given bounds.

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

### Parameters

**** (\[BoundsInt]\(/engine/7000.0/script-reference/unityengine/boundsint)): Bounds to clamp to.

## ClampToBounds(BoundsInt)

Clamps the position and size of this bounding box to the given bounds.

```csharp
public void ClampToBounds(in BoundsInt bounds)
```

### Parameters

**** (\[BoundsInt]\(/engine/7000.0/script-reference/unityengine/boundsint)): Bounds to clamp to.
