1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-21 01:36:05 +08:00
2016-06-17 16:31:38 +02:00

25 lines
522 B
C#

using DG.Tweening;
using System.Collections;
using UnityEngine;
public class Paths : BrainBase
{
public Transform target;
public DOTweenPath dotweenPath;
void Start()
{
Vector3[] p = new[] {
new Vector3(2,2,2),
new Vector3(2,4,2),
new Vector3(0,2,2),
};
target.DOPath(p, 4);
// Log length of each DOTweenPath waypoint
Debug.Log(dotweenPath.path.wpLengths.Length);
for (int i = 0; i < dotweenPath.path.wpLengths.Length; ++i) {
Debug.Log(i + " > " + dotweenPath.path.wpLengths[i]);
}
}
}