Click or drag to resize

HierarchyFindTransformByPath Method (Transform, String, Transform)

Finds a transform in the hirerachy by the provided path.

Namespace:  KSPDev.ModelUtils
Assembly:  KSPDev_Utils.1.0 (in KSPDev_Utils.1.0.dll) Version: 1.0 for KSP v1.6+
Syntax
C#
public static Transform FindTransformByPath(
	Transform parent,
	string path,
	Transform defValue = null
)
Request Example View Source

Parameters

parent
Type: UnityEngineTransform
The transfrom to start looking from.
path
Type: SystemString
The path to the target. The name components must be escaped if they contain the special symbols.
defValue (Optional)
Type: UnityEngineTransform
An object to return if the path is not found. This situation will be treated as a danger, and a warning log record will be made.

Return Value

Type: Transform
A transform or null if nothing found.
Remarks
See Also