TransformExt.CalculateRectBounds Method

Computes the bounds containing a RectTransform’s rect.

Namespace: UltimateXR.Extensions.Unity
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static Bounds CalculateRectBounds(
	this RectTransform transform,
	Space space = Space.World
)

Parameters

 

transform
Type: RectTransform
RectTransform to process
space (Optional)
Type: Space
Space in which to retrieve the bounds

Return Value

Type: Bounds
Bounds of the RectTransform

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type RectTransform. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ExceptionCondition
ArgumentNullExceptionTransform is null

See Also

Reference

TransformExt Class
UltimateXR.Extensions.Unity Namespace