This is my fifth edit to this reply so I apologize if it gives you notifications each time I do. I keep thinking I figured something out and then end up back at square one. I will try to word the issue as best as I can from the observations I have made. I posted a couple pictures, but with my status cannot post anymore so I will try to use them as reference. I have a unit class that uses the pathfinding project library in addition to the new GraphUitilities.GetContours method. The unit class is in a turn based strategy game with designated movement points and turn states. That is somewhat irrelevant but I though I would make all information that might help known. I have followed and copied some of the work from the turn based strategy example. First I generate possible moves and then I pick all of the nodes from that move list and ask the GetContours method to draw a line around them using a linerenderer as well as the default debug lines in the editor. The whole process seems to work perfectly as long as I have a gameobject in the scene designated as an obstacle within movement range of the unit. Any time I assign the unit to move outside the range of the obstacles, the GetContours method returns no vertices on the callback. I have put debug logs throughout the actual method for GetContours to see where it is stopping and it seems to not be making it past the line of code where it checks to see "if there is an obstacle in that direction". I don't know if I am setting something up wrong in the editor or if I have made a dumb coding error somewhere. I have what I believe is the important lines from my code to find the problem but please let me know if I can post anything else that will help. The pictures actually tell this same story as well.
This picture below shows the units movement range when it is down to one movement point and an obstacle is near by.
This picture shows a different unit in the open with one movement range left and no contour showing around the potential movement choices.
Below is the current code I am using. I am not sure how to designate it as such in this post so it seems to not place my entire code into one scrollable area leaving off the top couple lines. Sorry, newb.
public void GeneratePossibleMoves(Humanoid humanoid, int movementPoints)
ConstantPath path = ConstantPath.Construct(transform.position, (movementPoints * 1000 + 1) *2);
path.traversalProvider = TraversalProvider;
GridNodeBase nodesToContourAll = path.allNodes.Cast<GridNodeBase>().ToArray<GridNodeBase>();
foreach (GraphNode node in path.allNodes)
if (node != path.startNode)
GameObject go = GameObject.Instantiate(GameManager.MoveIndicatorPrefab, (Vector3)node.position, Quaternion.identity) as GameObject;
go.GetComponent<Astar3DButton>().node = node;
private void DrawContour(GridNodeBase nodesToContour)
GridGraph grid = AstarPath.active.data.gridGraph;
GraphUtilities.GetContours(grid, vertices =>
OutlineRenderer.TotalPointsOnPath = vertices.Length;
OutlineRenderer.LineRendererActual.positionCount = OutlineRenderer.TotalPointsOnPath;
for (int i = 0; i < OutlineRenderer.TotalPointsOnPath; i++)
for (int i = 0; i < vertices.Length; i++)
Debug.DrawLine(vertices[i], vertices[(i + 1) % vertices.Length], Color.red, 4);