Issue with OnNodeCostCallback


When I update the color of my tile markers using NodesAround and updating the color of tiles of valid attack targets using OnNodeCostCallback it still updates the color of a tile even if it is out of height range. I posted a gist with some of the code I can’t see what I’ve done wrong yet. Thanks!


I found out the reason it wasn’t updating correctly was becuase of this line that I had put in the OnNodeCostCallback

if ((toNode as SceneMapTile).eUnit != null) return 1f;

Took it out and it works fine as it was supposed to before I messed with it :o)