TransformExt.AlignOnAxis Method

Aligns a set of transforms on an axis.

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

Syntax

C#

public static void AlignOnAxis(
	this IEnumerable<Transform> transforms,
	float padding,
	Vector3 axis,
	Space space = Space.World
)

Parameters

 

transforms
Type: System.Collections.Generic.IEnumerable(Transform)
Transform whose children to align
padding
Type: System.Single
Pivot separation between the different children
axis
Type: Vector3
Axis where the children will be aligned
space (Optional)
Type: Space
Space to use for the alignment axis

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
[!:System.ArgumentNullException]Transform is null

See Also

Reference

TransformExt Class
UltimateXR.Extensions.Unity Namespace