Class TransformExtensions
Represents a series of Transform extension methods.
Inherited Members
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 |
Returns
Type | Description |
---|---|
Transform | The found transform, or |