TransformExt.CalculateBounds Method (Transform, Space, Boolean)

Computes the bounds of all MeshRenderers that hang from a parent transform.

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

Syntax

C#

public static Bounds CalculateBounds(
	this Transform self,
	Space space = Space.World,
	bool includeInactive = false
)

Parameters

 

self
Type: Transform
Parent Transform to get all the MeshRenderers of
space (Optional)
Type: Space
Space in which to retrieve the bounds
includeInactive (Optional)
Type: System.Boolean
Whether to include inactive MeshRenderers

Return Value

Type: Bounds
Bounds containing all MeshRenderers

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Transform. 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
CalculateBounds Overload
UltimateXR.Extensions.Unity Namespace