Table of Contents

Class FindExtensions

Namespace
Glitch9
public static class FindExtensions
Inheritance
FindExtensions
Inherited Members

Methods

Find(GameObject, string)

public static GameObject Find(this GameObject gameObject, string childName)

Parameters

gameObject GameObject
childName string

Returns

GameObject

FindContainer<TContainer>(TContainer)

public static Transform FindContainer<TContainer>(this TContainer container) where TContainer : MonoBehaviour

Parameters

container TContainer

Returns

Transform

Type Parameters

TContainer

FindDeepChild(Transform, string, bool)

public static Transform FindDeepChild(this Transform parent, string childName, bool includeInactive = false)

Parameters

parent Transform
childName string
includeInactive bool

Returns

Transform

FindGameObjectWithTagInChildren(Transform, string)

public static GameObject FindGameObjectWithTagInChildren(this Transform parent, string tag)

Parameters

parent Transform
tag string

Returns

GameObject

FindGameObjectsWithTagInChildren(Transform, string)

public static GameObject[] FindGameObjectsWithTagInChildren(this Transform parent, string tag)

Parameters

parent Transform
tag string

Returns

GameObject[]

Find<TSelf>(TSelf, string)

public static Transform Find<TSelf>(this TSelf self, string childName) where TSelf : MonoBehaviour

Parameters

self TSelf
childName string

Returns

Transform

Type Parameters

TSelf

Find<T, TSelf>(TSelf, T, string)

public static T Find<T, TSelf>(this TSelf self, T defaultComponent, string chileName) where TSelf : MonoBehaviour

Parameters

self TSelf
defaultComponent T
chileName string

Returns

T

Type Parameters

T
TSelf

Find<T, TSelf>(TSelf, T, string, string)

public static T Find<T, TSelf>(this TSelf self, T defaultComponent, string chileName, string path) where TSelf : MonoBehaviour

Parameters

self TSelf
defaultComponent T
chileName string
path string

Returns

T

Type Parameters

T
TSelf

GetChildIndex<T>(T)

public static int GetChildIndex<T>(this T obj) where T : Component

Parameters

obj T

Returns

int

Type Parameters

T

GetComponentInChildrenWithName(Transform, Type, bool, params string[])

public static Component GetComponentInChildrenWithName(this Transform parent, Type type, bool includeInactive, params string[] names)

Parameters

parent Transform
type Type
includeInactive bool
names string[]

Returns

Component

GetComponentInChildrenWithName(Transform, Type, params string[])

public static Component GetComponentInChildrenWithName(this Transform parent, Type type, params string[] names)

Parameters

parent Transform
type Type
names string[]

Returns

Component

GetComponentInChildrenWithName<T>(Transform, bool, params string[])

public static T GetComponentInChildrenWithName<T>(this Transform parent, bool includeInactive, params string[] names) where T : Component

Parameters

parent Transform
includeInactive bool
names string[]

Returns

T

Type Parameters

T

GetComponentInChildrenWithName<T>(Transform, params string[])

public static T GetComponentInChildrenWithName<T>(this Transform parent, params string[] names) where T : Component

Parameters

parent Transform
names string[]

Returns

T

Type Parameters

T

GetOrAddComponentInChildren<T>(GameObject, string)

public static T GetOrAddComponentInChildren<T>(this GameObject gameObject, string nameToSearch) where T : Component

Parameters

gameObject GameObject
nameToSearch string

Returns

T

Type Parameters

T

GetOrAddComponentInChildren<T>(RectTransform, string)

public static T GetOrAddComponentInChildren<T>(this RectTransform rect, string childName = null) where T : Component

Parameters

rect RectTransform
childName string

Returns

T

Type Parameters

T

GetOrAddComponentInChildren<T, TV>(TV, string)

public static T GetOrAddComponentInChildren<T, TV>(this TV obj, string childName = null) where T : Component where TV : Component

Parameters

obj TV
childName string

Returns

T

Type Parameters

T
TV

GetOrAddComponent<T>(GameObject)

public static T GetOrAddComponent<T>(this GameObject obj) where T : Component

Parameters

obj GameObject

Returns

T

Type Parameters

T

GetOrAddComponent<T>(Transform)

public static T GetOrAddComponent<T>(this Transform obj) where T : Component

Parameters

obj Transform

Returns

T

Type Parameters

T

GetOrAddGameObject(GameObject, string, string)

public static GameObject GetOrAddGameObject(this GameObject parent, string objName, string secondName = null)

Parameters

parent GameObject
objName string
secondName string

Returns

GameObject

GetOrAddGameObjectInChildren(GameObject, string)

public static GameObject GetOrAddGameObjectInChildren(this GameObject obj, string childName)

Parameters

obj GameObject
childName string

Returns

GameObject

SafeDestroyChild(GameObject, string)

public static void SafeDestroyChild(this GameObject obj, string childName)

Parameters

obj GameObject
childName string