TransformExt.CalculateBounds Method (IEnumerable(Transform), Space, Boolean)

Gets the bounds in a given space of all MeshRenderers in a set of Transforms.

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

Syntax

C#

public static Bounds CalculateBounds(
	this IEnumerable<Transform> transforms,
	Space space = Space.World,
	bool includeInactive = false
)

Parameters

 

transforms
Type: System.Collections.Generic.IEnumerable(Transform)
Transforms whose MeshRenderers to get the bounds 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 IEnumerable(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
ArgumentNullExceptiontransforms is null

See Also

Reference

TransformExt Class
CalculateBounds Overload
UltimateXR.Extensions.Unity Namespace