Kermer icon

Saving to engine.cfg

Kermer | PRO | 10/02/17 07:21:28 PM UTC | 0 ⭐ | 240 👁️ | Never ⏰ | []
Python |

520 B

|

None

|

0 👍

/

0 👎

func _ready():
    set_value("application/name","Some example name") # key MUST BE LOWERCASE, it's capitalized inside project settings!
    # After doing that, go back to project list and reopen your project
    # It modified your engine.cfg
 
func set_value(key, value):
    Globals.set(key,value)
    Globals.set_persisting(key,true) # unnecessary if you checked checkbox on to the left of the property in Project Settings
    # ^ non-persistent properties will be reset after reopening the app/project
    Globals.save() # save to engine.cfg

Comments