Ok, that's a good point let me clear it up
Let's think about this like a chess board, where we have an 8x8 grid, and each square that a piece is standing on, is unwalkable.
Scenario 1: I have a hero who is X squares away, and he needs to path to an enemy.
Current Solution: Find the enemy who is the target, make his node walkable. Call StartPath, grab the array of path nodes, and remove the last node from the array. Make enemy node unwalkable again. You now have the best path.
Suggested Solution: Create a new override StartPath function such as: Call StartPath(startpos, endpos, endPosWalkable = true), where the endpos given finds the nearest node, regardless of wether or not it is walkable, and paths to that node. All other unwalkable nodes are still accounted for in the pathing system.
Scenario 2: I have a hero, it is his turn, I want to highlight all the tiles that he can reach that are 3 squares away. I also want to highlight enemy tiles that can be reached a different color, interactive items (like a chest) a different color, etc.
Current Solution: Maintain my own grid, that is a 1:1 grid with the existing gridgraph. Do an outward search from my own maintained grid, grabbing all tiles up to 3 squares away. Then search each tile to see if there is an entity, chest, or some kind of blocker (ie a wall). Highlight the tiles as I go along.
Suggested Solution: A little more complex.
First, it would be great if we extended GridGraph all together, so that the transform that sets a node to unwalkable is stored in the GridGraph. It would be a member in GridNode.
Second, an override function for ConstantGraph.Construct(), that returns only unwalkable nodes, so that you can easily scan them and see what is there. (Like an entity, chest, wall, etc).
Let me know what you think.