Settings#
Singleton for accessing and editing persistent settings. More...
import Script
Properties#
Name | |
---|---|
bool | isTesting |
Methods#
Name | |
---|---|
bool | hasValue(string path) |
variant | setValue(string path, variant value) |
variant | value(string path, variant defaultValue = null) |
Detailed Description#
The settings are stored in a json file, and could be:
- bool
- int
- double
- string
- array<string>
Property Documentation#
bool isTesting#
Returns true if Knut is currently in a test, and false otherwise
Method Documentation#
bool hasValue(string path)#
Returns true if the project settings has a settings path
.
variant setValue(string path, variant value)#
Adds a new value value
to the project settings at the given path
. Returns true
if the operation succeeded.
variant value(string path, variant defaultValue = null)#
Returns the value of the settings path
, or defaultValue
if the settings does not exist.