Show / Hide Table of Contents

Method FindDeepChild

| Edit this page View Source

FindDeepChild(GameObject, string, IterativeSearchType)

Extension method to find nested children by name using either a breadth-first or depth-first search. Default is breadth-first.
Declaration
public static Transform FindDeepChild(this GameObject gameObject, string childName, Utils.IterativeSearchType searchType = null)
Parameters
Type Name Description
GameObject gameObject
string childName Name of the child object to search for.
IterativeSearchType searchType Whether to preform a breadth first or depth first search. Default is breadth first.
Returns
Type Description
Transform
| Edit this page View Source

FindDeepChild(GameObject, IEnumerable<string>, IterativeSearchType)

Extension method to find nested children by an ordered list of names using either a breadth-first or depth-first search. Default is breadth-first.
Declaration
public static Transform FindDeepChild(this GameObject gameObject, IEnumerable<string> childNames, Utils.IterativeSearchType searchType = null)
Parameters
Type Name Description
GameObject gameObject
IEnumerable<string> childNames Names in order of the child object to search for.
IterativeSearchType searchType Whether to preform a breadth first or depth first search. Default is breadth first.
Returns
Type Description
Transform
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾