Hello again. I am trying to figure out the syntax for doing a callback when using OnWaypointChange. Reading the documentation it looks like I need to supply "waypoints" which I know is a Vector3 array, but I want to use the values that are in the DOTween Path I've created in the pro editor. I've tried to figure out how to do this for hours and the lack of examples has me stuck, and I'm not even sure if I'm close. Please advise; here's my non working code:
private Vector3[] waypoints;
void Start ()
{
Tween path = GetComponent<DOTweenPath>().GetTween();
waypoints = path.PathGetDrawPoints;
transform.DOPath(waypoints, 1).OnWaypointChange(MyCallback);
}
For awhile it seemed I was getting closer, but I think it needed the array length and PathGetDrawPoints.Length wasn't working for it.
Ultimately I actually don't care about the waypoints array as long as I can run the path tween I made in the editor, and can do my callback when the waypoint change is made; if there is a more direct solution that would be fine too.
Would it be possible to add the waypoint callbacks to the Pro Editor/Inspector in the future, similar to how I can do them for OnComplete, OnPlay etc?