Hello, I’m on Lecture 17 working on the Level grid. My code was working until I hit the point of trying to transform everything into a UnitList. Once I started trying to run it I now have a ton of errors and I’m not sure why! I even went as far as copy pasting all changed files from the gitlab trying to figure out exactly which file was causing the error.
The ‘unreachable code’ comes from GridObject.cs can you show us that script?
The NRE is from this script (GridDebugObject) and suggests either the textMeshPro field has not been assigned in the inspector, or the gridObject has not been set. I suspect it’s the latter and fixing the unreachable code will also fix this. But I wouldn’t know without seeing the GridObject script
The unreachable code is here (marked above). You are returning out of the method, so none of the code below it in that function will run, so it’s ‘unreachable’.
Doesn’t explain the NRE. Check that you have assigned the text field in the inspector and that you are actually calling SetGridObject(...) in the GridSystem when you create the grid debug objects