extends Node const ConfigPath = "user://config.tres" func saveConfigs(): var NewConfig = Config.new() NewConfig.username = MainGame.username NewConfig.language = MainGame.loadedLanguage var sc = ResourceSaver.save(NewConfig, ConfigPath) func loadConfig() -> Config: if ResourceLoader.exists(ConfigPath): var LoadedConfig = load(ConfigPath) if LoadedConfig: return LoadedConfig return Config.new()