Version: 2021.3

AnimationUtility.CalculateTransformPath

切换到手册
public static string CalculateTransformPath (Transform targetTransform, Transform root);

返回

string Returns a string representing the path in the transform hierarchy.

描述

Retrieves the path from the root transform to the target transform.

根变换不需要是实际的根,但它必须在层级视图中高于目标变换。目标和根也可以是相同的变换。