Class TransformUtils
public static class TransformUtils
- Inheritance
-
TransformUtils
- Inherited Members
-
Methods
public static Component FindClosestComponentInHierarchy(Transform startFrom, Type type, GameObject[] roots = null)
Parameters
startFrom Transform
type Type
roots GameObject[]
Returns
- Component
public static T FindClosestComponentInHierarchy<T>(Transform startFrom, GameObject[] roots = null) where T : Component
Parameters
startFrom Transform
roots GameObject[]
Returns
- T
Type Parameters
T
public static float GetGlobalAspect(Transform transform, Vector2 size)
Parameters
transform Transform
size Vector2
Returns
- float
public static bool IsAvailableOnRuntime(this UnityEngine.Object gameObjectOrComponent)
Parameters
gameObjectOrComponent Object
Returns
- 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
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
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
public static bool NormalizeDimensions(this RectTransform transform, Axis axis, bool undo = true)
Parameters
transform RectTransform
axis Axis
undo bool
Returns
- bool
public static bool SynchronizeColliderWithRect(this RectTransform transform, BoxCollider collider, bool undo = true)
Parameters
transform RectTransform
collider BoxCollider
undo bool
Returns
- bool