HierarchyFindTransformInChildren Method |
Finds a transform by name down the hierarchy.
Namespace:
KSPDev.ModelUtils
Assembly:
KSPDev_Utils.1.2 (in KSPDev_Utils.1.2.dll) Version: 1.2 for KSP v1.6+
Syntaxpublic static Transform FindTransformInChildren(
Transform parent,
string name,
Transform defValue = null
)
Request Example
View SourceParameters
- parent
- Type: UnityEngineTransform
The transfrom to start from. - name
- Type: SystemString
The name of the transfrom. - defValue (Optional)
- Type: UnityEngineTransform
An object to return if the name is not found. This situation will be treated as a danger, and
a warning log record will be made.
Return Value
Type:
TransformA transform or
null if nothing is found.
Remarks
Implements breadth-first search approach to minimize depth of the found transform.
See Also