sturdyspoon/unity-pathfinding

Possible to list all tiles that returned path passes through?

aafishman opened this issue · 0 comments

Hello,

I've been playing with the library and scripts over the last couple of days and overall its been fun - very solid path finding for 4-dir and 8-dir, useful for a lot of applications I have in mind.

I have not been able to find a way to cleanly generate a list of all the tiles that the returned path passes through. I can see all of the nodes and pass those around for various interactions, but now I am needing a list of each individual tile that the path passes through. Do you have any suggestions for how to go about this?

Either by editing existing functions or somehow iterating over the generated path to pull out the tiles it passes through (possibly very inefficient)? It seems that of course each 'correct' tile in the path has been evaluated by the algorithms at some point and deemed 'being on path,' but I am having trouble identifying where those are. If I could I could just add them to a list of 'on-path tiles', removing duplicates if need be if the obvious solutions create doubles.

Thanks!