I am getting a NullReferenceException every time I change something in my code while the game is running. The exception looks like this:
NullReferenceException: Object reference not set to an instance of an object
MainMenu.Update () (at Assets/Scripts/Menu Handlers/MainMenu.cs:26)
And here is line 26:
void Update() {
settings.tick(); // Line 26
}
The settings variable happens to be null even though I set it like that:
public static Settings settings;
void Start() {
settings = new Settings(mobile);
}
The Settings script does not extend anything