This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

engine.config Functions

Reads values (settings) from the configuration file and writes back into it.

Config Class

Members


void engine.config.setBool(string name, int value)

Sets a boolean value of a given setting. If a setting with this name already exists, its value is overwritten.

Arguments

  • string name - Name of the setting.
  • int value - Boolean value (0 or 1). 0 stands for "false", 1 stands for "true".

int engine.config.getBool(string name)

Reads a boolean value of a given setting.

Arguments

  • string name - Name of the setting.

Return value

Boolean value (0 or 1) of the setting. 0 stands for "false", 1 stands for "true".

int engine.config.getBool(string name, int value)

Reads a boolean value of a given setting.

Arguments

  • string name - Name of the setting.
  • int value - Custom value to be returned if nothing is found.

Return value

Boolean value (0 or 1) of the setting. 0 stands for "false", 1 stands for "true".

int engine.config.isExist(string name)

Checks, whether a setting with a given name exists.

Arguments

  • string name - Name of the setting.

Return value

1 if the setting exists; otherwise, 0.

void engine.config.setFloat(string name, float value)

Sets a float value of a given setting. If a setting with this name already exists, its value is overwritten.

Arguments

  • string name - Name of the setting.
  • float value - Float value.

float engine.config.getFloat(string name, float value)

Reads a float value of a given setting.

Arguments

  • string name - Name of the setting.
  • float value - Custom value to be returned if nothing is found.

Return value

Float value of the setting.

float engine.config.getFloat(string name)

Reads a float value of a given setting.

Arguments

  • string name - Name of the setting.

Return value

Float value of the setting.

void engine.config.setInt(string name, int value)

Sets an integer value of a given setting. If a setting with this name already exists, its value is overwritten.

Arguments

  • string name - Name of the setting.
  • int value - Integer value.

int engine.config.getInt(string name)

Reads an integer value of a given setting.

Arguments

  • string name - Name of the setting.

Return value

Integer value of the setting.

int engine.config.getInt(string name, int value)

Reads an integer value of a given setting.

Arguments

  • string name - Name of the setting.
  • int value - Custom value to be returned if nothing is found.

Return value

Integer value of the setting.

void engine.config.setString(string name, string value)

Sets a string value of a given setting. If a setting with this name already exists, its value is overwritten.

Arguments

  • string name - Name of the setting.
  • string value - String value.

string engine.config.getString(string name, string value)

Reads a string value of a given setting.

Arguments

  • string name - Name of the setting.
  • string value - Custom value to be returned if nothing is found.

Return value

String value of the setting.

string engine.config.getString(string name)

Reads a string value of a given setting.

Arguments

  • string name - Name of the setting.

Return value

String value of the setting.

int engine.config.flush()

Flushes config into the current file.

Return value

Returns 1 if the config is successfully flushed into the file; otherwise, 0.

int engine.config.load(string name)

Loads config from the file.

Arguments

  • string name - Config file name.

Return value

Returns 1 if the config is successfully loaded from the file; otherwise, 0 is returned.

void engine.config.remove(string name)

Removes a setting with a given name from the configuration file.

Arguments

  • string name - Name of the setting.

int engine.config.save(string name)

Saves config into the file.

Arguments

  • string name - Config file name.

Return value

Returns 1 if the config is successfully saved into the file; otherwise, 0 is returned.
Last update: 2017-07-03
Build: ()