HierarchyFindTransformInChildren Method |
Finds a transform by name down the hierarchy.
Namespace:
KSPDev.ModelUtils
Assembly:
KSPDev_Utils.2.0 (in KSPDev_Utils.2.0.dll) Version: 2.0 for KSP v1.8+
Syntaxpublic static Transform FindTransformInChildren(
Transform parent,
string name,
Transform defValue = null
)
Request Example
View SourceParameters
- parent
- Type: Transform
The transfrom to start from. - name
- Type: SystemString
The name of the transfrom. - defValue (Optional)
- Type: Transform
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