# OnChildRectTransformDimensionsChange()

> Called when a child RectTransform's dimensions change.

## Definition

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

```csharp
public void OnChildRectTransformDimensionsChange()
```

### Remarks

Sent to the parent [RectTransform](/engine/6000.7/script-reference/unityengine/recttransform.md) when the dimensions of an immediate child RectTransform change. Use it in UI hierarchies where layouts need to respond dynamically to size changes. **Important:** This message is only sent if the parent [RectTransform.sendChildDimensionsChange](/engine/6000.7/script-reference/unityengine/recttransform/sendchilddimensionschange.md) property is set to `true`. If this property is `false`, the parent will not receive the callback even when a child changes size.

### Examples

```csharp

{code Documentation/ManualDocs/com.unity.documentation-examples/CoreProgramming/Scripts/Transform/OnChildRectTransformDimensionsChangeExample.cs}
```
