Options Not Working

My options sliders will not save after I changed them.

how will it work?

Hi Jerry (@ko87879),

From memory, the method SaveAndExit is wired up to the Save button within the Options scene, so when that button is pressed this method should be called.

Lets start by checking that it is being called, pop a Debug.Log statement at the top of that method, e.g.

public void SaveAndExit()
    Debug.Log("SaveAndExit method called");

    // ...

Now, run your game, enter the options scene, change the sliders and click Save. Your console should display the message from our Debug.Log statement, does it?

Also, it is typically a lot easier to just copy/paste your code into the forum rather than using screenshots, those are great for displaying error messages and the Unity editor, but for code, if you use them, those trying to help you are unable to copy/paste chunks of your code as examples for you.

See also;


1 Like

Have you resolved the problem now, what was the issue?

Just adding another suggestion. My button is call ‘Back’ do you have the Button Script component included in your button and does the Click() have are reference to the script: In Unity you should have a reference to runtime, OptionsController and the SaveAndExit() method.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

Privacy & Terms