Hello, I want to GetTotalLength() from ABPath.
Here is part of my code
var pathAB = ABPath.Construct(transform.position, tile.transform.position);
AstarPath.StartPath(pathAB);
List<Vector3> vectorPath = pathAB.vectorPath;
float ilosc = pathAB.GetTotalLength();
Debug.Log("Total length: " + pathAB.GetTotalLength());
Debug.Log("Total length v2 : " + pathAB.vectorPath.Count);
Debug.Log("Total length v3 : " + vectorPath.Count);
It turns out 0 in Debug.Log
Could someone give me an example code how to use GetTotalLength() function? Even shortest from the short will be okay, I want to learn how to use it properly.