Unity - Scripting API: MonoBehaviour.OnChildRectTransformDimensionsChange()
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Description
Called when a child RectTransform's dimensions change.
Sent to the parent RectTransform 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 property is set to true. If this property is false, the parent will not receive the callback even when a child changes size.