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.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.UIModule
CalculateRelativeRectTransformBounds(Transform, Transform)
Creates a Bounds object that encapsulates all the child RectTransform objects found in the parameter, and converts the resulting bounds into local space relative to the transform.
childrootpublic static Bounds CalculateRelativeRectTransformBounds(Transform root, Transform child)
Parameters
Returns
Type | Description |
|---|---|
| Bounds | 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 parameter, and converts the resulting bounds into local space relative to the transform.
childrootpublic static Bounds CalculateRelativeRectTransformBounds(Transform trans)
Parameters
The Transform to both search for RectTransform children and convert into world to local space.
Returns
Type | Description |
|---|---|
| Bounds | A Bounds object representing the encapsulated bounds in local space relative to the root Transform. |