I’ve been trying to figure out how to remedy null reference exemptions for Laser Defender.
When I click start from the start screen and go into the game I get a Null reference exception that there is no instance for Level.LoadGame() (even though it loads the game just fine)
If i start the editor from the Game Over screen I get a null reference exception for ScoreDisplay.Update()
I know that its not really effecting anything but I’m curious how I would tighten my code up so that I don’t receive errors like this. I’ve tried using difference if statements to have it ignore the missing object but that didn’t work. Or is this normal and I’m forced to have to look at the error’s in error log even though they’re not effecting anything?