A* Pathfinding Project

Extending Node class to store extra metadata


Hey there, I’m using a grid graph in my game. I would really like to somehow extend the GridNode class to store more meta-data about the node to support systems within my game. Is there any way to do this? I have currently created a new class that keeps a 1:1 map of node meta-data that corresponds to the GridGraph list of nodes; but using it this way has become cumbersome and error prone. Thoughts?



You could just make a class CustomGridNode. And modify the gridgenerator to fit your needs.

By using source control like git, you can save your changes as a patch. To be used in case you update to a newer version of A*