Kermer

Saving to engine.cfg

Oct 2nd, 2017
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. func _ready():
  2.     set_value("application/name","Some example name") # key MUST BE LOWERCASE, it's capitalized inside project settings!
  3.     # After doing that, go back to project list and reopen your project
  4.     # It modified your engine.cfg
  5.  
  6. func set_value(key, value):
  7.     Globals.set(key,value)
  8.     Globals.set_persisting(key,true) # unnecessary if you checked checkbox on to the left of the property in Project Settings
  9.     # ^ non-persistent properties will be reset after reopening the app/project
  10.     Globals.save() # save to engine.cfg
Advertisement
Add Comment
Please, Sign In to add comment