# Contains(RectTransform)

> Checks whether the world-space bounding box of this RectTransform fully contains the world-space bounding box of another RectTransform.

## Definition

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

```csharp
public bool Contains(RectTransform other)
```

### Parameters

**** (\[RectTransform]\(/engine/6000.7/script-reference/unityengine/recttransform)): The RectTransform whose world-space bounds to test against.

### Returns

| Type                                                          | Description                                                                                                             |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the world-space bounding box of this RectTransform fully contains the bounding box of `other`; false otherwise. |

### Remarks

Both bounding boxes are axis-aligned and are computed from the four world-space corners via [RectTransform.GetWorldRect](/engine/6000.7/script-reference/unityengine/recttransform/getworldrect.md). Containment is inclusive on all edges, so a RectTransform returns true when tested against itself. Because world-space AABBs are used, a rotated element has an expanded bounding box; two visually overlapping elements may not satisfy containment if their AABBs differ.

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