TriLib
Search Results for

    Show / Hide Table of Contents

    Class TransformExtensions

    Represents a series of Transform extension methods.

    Inheritance
    object
    TransformExtensions
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: TriLibCore.Extensions
    Assembly: TriLibCore.dll
    Syntax
    public static class TransformExtensions

    Methods

    BuildPath(Transform, Transform)

    Builds a path to the given Transform hierarchy.

    Declaration
    public static string BuildPath(this Transform transform, Transform rootTransform)
    Parameters
    Type Name Description
    Transform transform

    The Transform to build the path from.

    Transform rootTransform

    The Transform where the hierarchy ends.

    Returns
    Type Description
    string

    The built path

    CountChild(Transform)

    Recursively counts this Transform children.

    Declaration
    public static int CountChild(this Transform transform)
    Parameters
    Type Name Description
    Transform transform

    The Transform containing the children.

    Returns
    Type Description
    int

    The children count

    FindDeepChild(Transform, string, StringComparisonMode, bool)

    Tries to recursively find a Transform on another Transform hierarchy by its name.

    Declaration
    public static Transform FindDeepChild(this Transform transform, string right, StringComparisonMode stringComparisonMode, bool caseInsensitive)
    Parameters
    Type Name Description
    Transform transform

    The Transform containing the children.

    string right

    The Transform name to search for

    StringComparisonMode stringComparisonMode

    The type of comparison to use.

    bool caseInsensitive

    Pass true to do a case-insensitive search.

    Returns
    Type Description
    Transform

    The found transform, or null

    In this article
    Back to top Generated by DocFX