# CalculateRelativeRectTransformBounds

> Creates a Bounds object that encapsulates all the child RectTransform objects found in the child parameter, and converts the resulting bounds into local space relative to the root transform.

## Definition

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

## CalculateRelativeRectTransformBounds(Transform, Transform)

Creates a Bounds object that encapsulates all the child RectTransform objects found in the `child` parameter, and converts the resulting bounds into local space relative to the `root` transform.

```csharp
public static Bounds CalculateRelativeRectTransformBounds(Transform root, Transform child)
```

### Parameters

**** (\[Transform]\(/engine/6000.6/script-reference/unityengine/transform)): The Transform to use when converting from world to local space.**** (\[Transform]\(/engine/6000.6/script-reference/unityengine/transform)): The parent Transform object whose RectTransform children will be encapsulated.

### Returns

| Type                                                            | Description                                                                                         |
| --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| [Bounds](/engine/6000.6/script-reference/unityengine/bounds.md) | A Bounds object representing the encapsulated bounds in local space relative to the root Transform. |

## CalculateRelativeRectTransformBounds(Transform)

Creates a Bounds object that encapsulates all the child RectTransform objects found in the `child` parameter, and converts the resulting bounds into local space relative to the `root` transform.

```csharp
public static Bounds CalculateRelativeRectTransformBounds(Transform trans)
```

### Parameters

**** (\[Transform]\(/engine/6000.6/script-reference/unityengine/transform)): The Transform to both search for RectTransform children and convert into world to local space.

### Returns

| Type                                                            | Description                                                                                         |
| --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| [Bounds](/engine/6000.6/script-reference/unityengine/bounds.md) | A Bounds object representing the encapsulated bounds in local space relative to the root Transform. |
