When I tested following the script updates to the Tile, PathFinder and GridManager scripts my towers were no longer instantiatiating with the OnMouseDown method. In addition to the expected error of the Enemy not being able to find its path, I also get a NullReferenceException pointing to the Tile script:
And here’s the code block at line 37:
Thinking that I had somehow unknowingly messed up the Tile prefab, I double checked that the Tower prefab was still in the serialized field in the Inspector (it is):
Then to be sure there wasn’t anything wrong with the tower prefab itself, I checked that. It appears to be fine as well:
I have to admit, because I’m not really understanding what’s happening in this section, I have no idea where else to look to resolve the error. Any guidance would be appreciated.