taylormorris Posted September 16, 2015 Share Posted September 16, 2015 I've run into a problem setting up a settings page on our UI, and nothing pre-existing is being saved to CFG file in use. The general method I am trying is like this... engine.config.setInt("render_hdr", 1); engine.console.run("config_readonly 0"); engine.console.run("config_save"); engine.console.run("config_readonly 1"); But when I check the CFG file after closing the application, render_hdr has not changed its value. Strangely, I can create and change new, custom, variables, but not those used by the engine. Is it that engine variables must be set via the console and engine.console.setInt, etc. are only for custom variables..? The documentation doesn't say. Thanks! Link to comment
maxi Posted September 16, 2015 Share Posted September 16, 2015 Hi Taylor,There are console variables, that can be set in console, render_hdr is one of them. In config_save these console variables are writing it's values to config overwriting old ones. So yes, to change console variable, change it in engine.console.set... methods. You are right, we need to add this fact to documentation. Link to comment
taylormorris Posted September 17, 2015 Author Share Posted September 17, 2015 Great, running the console commands and then saving out is working! Thanks! Link to comment
Recommended Posts