Editar

Compartilhar via


TransformExtensions Class

Definition

Extension methods for Unity's Transform class

public ref class TransformExtensions abstract sealed
public static class TransformExtensions
type TransformExtensions = class
Public Module TransformExtensions
Inheritance
TransformExtensions

Methods

EnumerateAncestors(Transform, Boolean)

Enumerates the ancestors of the specified transform.

EnumerateHierarchy(Transform, ICollection<Transform>)

Enumerates all children in the hierarchy starting at the root object except for the branches in ignore.

EnumerateHierarchy(Transform)

Enumerates all children in the hierarchy starting at the root object.

FindAncestorComponent<T>(Transform, Boolean)

Find the first component of type T in the ancestors of the specified transform.

GetChildRecursive(Transform, String)

Walk hierarchy looking for named transform

GetColliderBounds(Transform)

Calculates the bounds of all the colliders attached to this GameObject and all its children

GetDepth(Transform)

Gets the hierarchical depth of the Transform from its root. Returns -1 if the transform is the root.

GetFullPath(Transform, String, String)

An extension method that will get you the full path to an object.

InverseTransformSize(Transform, Vector3)

Transforms the size from world to local.

IsParentOrChildOf(Transform, Transform)

Checks if the provided transforms are child/parent related.

TransformSize(Transform, Vector3)

Transforms the size from local to world.

TryGetDepth(Transform, Transform, Int32)

Tries to get the hierarchical depth of the Transform from the specified parent. This method is recursive.

Applies to