Hello,
I have a MainMenu scene where I have options window where I can toggle AutoRetry On/Off for my game with boolean controlled by Game Manager. That works just fine, but after I exit Main Menu to play the game and come back, toggle button state is not what it should be. I mean that even if AutoRetry is disabled, the checkmark is in the box.
Now the question is, how do I save the toggle state or make it match the boolean on scene startup.
Sorry if unclear question, feel free to ask further information.
So if you change the state of the toggle to off by clicking it and exit the menu then return, it’s again set to on? Or vice versa? If that’s the case then you must be setting it in script somewhere to a specific value. Does it always get set to on? Or always to off? Does it get set as the opposite of what you had clicked it?
There should be a script which keeps informations between scenes. That object will not be destroyed between scenes. To do this, OnAwake set DontDestroyOnLoad().