Table of Contents

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

target Transform
immediate bool
clearFromIndex int

ForceRefreshObject(Transform)

Turn off then turn on target transform gameobject.

public static void ForceRefreshObject(this Transform target)

Parameters

target Transform

ResetLocal(Transform)

Set local position, rotation, scale to default values for target transform.

public static void ResetLocal(this Transform target)

Parameters

target Transform

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

target Transform
parent Transform

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

target Transform
activate bool

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

target Transform
localPosition Vector3
localRotation Quaternion
localScale Vector3