Execution Order Null Reference

Just FYI: At timestamp 5:50 or so you can get into a null reference exception here if your Pathfinding script executes before your LevelGrid script does. I added my LevelGrid script to execute just after the UnitManager in the ScriptExecutionOrder dialog in Project Settings to fix this.

On what function? Both the Pathfinding and the LevelGrid should be fully instantiated on Awake, so by Start when you set walkable/unwalkable there should be no null references.

1 Like

Sorry I carried on past that point and can’t recall exactly which function, but adding my LevelGrid to the execution order definitely fixed it.

I also had this error

Screenshot 2022-11-20 at 22.41.13

but found that I had not removed the “as GridObject”

Screenshot 2022-11-20 at 23.01.30

from the GridSystem.

1 Like

Privacy & Terms