dotweenPath =transform.Find("InitialDoTweenPath_2").GetComponent<DOTweenPath>();
if (initialDoTweenPath != null)
{
// 获取路径的所有点
Vector3[] waypoints = dotweenPath.wps.ToArray();
// 打印路径的所有点
foreach (Vector3 waypoint in waypoints)
{
Debug.Log(waypoint);
}
}
else
{
Debug.LogError("InitialDoTweenPath_2 not found!");
}
通过代码获取DoTweenPath路径点
于 2024-02-02 10:02:55 首次发布