Godot Version
4.3
Question
I am trying to add a settings menu to my game so when I resume I want the changes to apply. But even if I call the function in process it only applies once until unless I reload the scene. Why is this happening and is their a way I can change this. this is the function
func update():
$scanlines.visible = setting.get_value("config", "scan")
$fps.visible = setting.get_value("config", "fps")
The data is stored in a config file. Thanks in advance.
Can’t really help as you have not shown enough of your code for us to spot any issues.
In the first instance print the values and see if they are what you are expecting, and you will be able to see when the update function is called too. (I would not put this in process, just do it on the btn pressed signal).
print("scanlines visibility setting: ", setting.get_value("config", "scan"))
print("fps visibility setting: ", setting.get_value("config", "fps"))
If I had to guess, you are either not setting your new values correctly, not reading them correctly or within your fps and scanlines nodes, somehow overriding the visibility settings. But as I say, that is just a guess.