#Trying to apply user preferences from resource on startup.

1 messages · Page 1 of 1 (latest)

grand rover
#

So i've got a resource set up which holds my game settings. It works just fine, except when I go to apply the game settings on startup. Applying the volume settings for example doesn't apply what was saved and then loaded, it puts the volume to max. Same with fullscreen, it kind of works but the tickbox in the settings isn't refreshed to indicate fullscreen mode is on. Any ideas on how to apply it properly?

#

Here's Applier.gd:

#

Settings_Menu.gd:

#

And user_preferences.gd

#

To clarify a bit, if I go into my options menu and change things, then hit the back button, it applies.

#

It does not however apply on startup. That's what i'm trying to solve.

#

Trying to apply user preferences from resource on startup.

dreamy quarry
#

It sounds like it isn't saving the settings to disk.
If you delete the file and try to press the button that attempts the save, do you see a new one being creted?

When using breakpoints, do you see the _ready() of Applier.gd run?

silver falcon
#

Did you consider. Using resource loader for loading ?

grand rover
grand rover
#

As for breakpoints, I don't see the _ready() of my applier script running....

#

Putting a print at the end of the ready call does reveal it loaded though...huh.

dreamy quarry
#

The cached version of the resource may be messing with things. Use the extra parameters of the load() function to avoid using the cache

grand rover
grand rover
#

Still no luck. This is odd.

#

To be fair though, I did forget to mention I have a disclaimer scene before the game loads, but no audio plays there currently.

#

Here's what's in Disclaimer.gd

#

That said, even changing the default scene on boot to be the main menu still results in the same exact issue.

#

So it's obviously not the disclaimer scene...

silver falcon
#

@grand rover did changing towards Resource Loader change anything. Maybe this asks for a short debug session

grand rover
#

Changing to resource loader did nothing it seems.