Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CalculateTransformPath(Transform, Transform)

Retrieves the path from the root Transform to the target Transform.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static string CalculateTransformPath(Transform targetTransform, Transform root)

Parameters

targetTransform


Returns

Type

Description

stringReturns a string that represents the path from the root Transform to the target Transform.

Remarks

The root Transform does not need to be an actual root, but it must be higher in the hierarchy than the target Transform. The target and root may also be the same Transform.