Class TransformExtensionMethods
- Namespace
- CodeBase
- Assembly
- 4Experience.CodeBase.Core.Runtime.dll
public static class TransformExtensionMethods
- Inheritance
-
TransformExtensionMethods
Methods
ClearChildren(Transform, bool, int)
Destroy all children of target transform starting from concrete index.
public static void ClearChildren(this Transform target, bool immediate = false, int clearFromIndex = 0)
Parameters
ForceRefreshObject(Transform)
Turn off then turn on target transform gameobject.
public static void ForceRefreshObject(this Transform target)
Parameters
targetTransform
ResetLocal(Transform)
Set local position, rotation, scale to default values for target transform.
public static void ResetLocal(this Transform target)
Parameters
targetTransform
ResetLocal(Transform, Transform)
Set parent for target transform and reset its local position, rotation, scale to default values.
public static void ResetLocal(this Transform target, Transform parent)
Parameters
targetTransformparentTransform
SetChildrenActiveOptimized(Transform, bool)
Set active state for all children of target transform use optimized solution.
public static void SetChildrenActiveOptimized(this Transform target, bool activate)
Parameters
targetTransformactivatebool
SetLocal(Transform, Vector3, Quaternion, Vector3)
Set local position, local rotation and local scale for target transform at once.
public static void SetLocal(this Transform target, Vector3 localPosition, Quaternion localRotation, Vector3 localScale)
Parameters
targetTransformlocalPositionVector3localRotationQuaternionlocalScaleVector3