Table of Contents

Class TransformUtils

public static class TransformUtils
Inheritance
TransformUtils
Inherited Members

Methods

FindClosestComponentInHierarchy(Transform, Type, GameObject[])

public static Component FindClosestComponentInHierarchy(Transform startFrom, Type type, GameObject[] roots = null)

Parameters

startFrom Transform
type Type
roots GameObject[]

Returns

Component

FindClosestComponentInHierarchy<T>(Transform, GameObject[])

public static T FindClosestComponentInHierarchy<T>(Transform startFrom, GameObject[] roots = null) where T : Component

Parameters

startFrom Transform
roots GameObject[]

Returns

T

Type Parameters

T

GetGlobalAspect(Transform, Vector2)

public static float GetGlobalAspect(Transform transform, Vector2 size)

Parameters

transform Transform
size Vector2

Returns

float

IsAvailableOnRuntime(Object)

public static bool IsAvailableOnRuntime(this UnityEngine.Object gameObjectOrComponent)

Parameters

gameObjectOrComponent Object

Returns

bool

IterateAllComponents<T>(GameObject, bool)

public static TransformUtils.ComponentsEnumerable<T> IterateAllComponents<T>(this GameObject gameObject, bool includeEditorOnly = false) where T : Component

Parameters

gameObject GameObject
includeEditorOnly bool

Returns

TransformUtils.ComponentsEnumerable<T>

Type Parameters

T

IterateAllComponents<T>(Scene, bool)

public static TransformUtils.ComponentsEnumerable<T> IterateAllComponents<T>(this Scene scene, bool includeEditorOnly = false) where T : Component

Parameters

scene Scene
includeEditorOnly bool

Returns

TransformUtils.ComponentsEnumerable<T>

Type Parameters

T

IterateAllComponents<T>(Stack<Transform>, bool)

public static TransformUtils.ComponentsEnumerable<T> IterateAllComponents<T>(Stack<Transform> pending, bool includeEditorOnly) where T : Component

Parameters

pending Stack<Transform>
includeEditorOnly bool

Returns

TransformUtils.ComponentsEnumerable<T>

Type Parameters

T

NormalizeDimensions(RectTransform, Axis, bool)

public static bool NormalizeDimensions(this RectTransform transform, Axis axis, bool undo = true)

Parameters

transform RectTransform
axis Axis
undo bool

Returns

bool

SynchronizeColliderWithRect(RectTransform, BoxCollider, bool)

public static bool SynchronizeColliderWithRect(this RectTransform transform, BoxCollider collider, bool undo = true)

Parameters

transform RectTransform
collider BoxCollider
undo bool

Returns

bool