TransformExt.AlignChildrenOnAxis Method
Aligns all children of a given component on an axis.
Namespace: UltimateXR.Extensions.Unity
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static void AlignChildrenOnAxis(
this Transform transform,
float padding,
Vector3 axis,
Space space = Space.World
)
Parameters
- transform
- Type: 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 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
Exception | Condition |
---|---|
[!:System.ArgumentNullException] | Transform is null |