для этой страницы,
отображается код на другом
All global engine-related and project-related settings are grouped and stored in separate configuration files located in your project's data/configs folder. Each configuration file is an XML file that stores settings of a certain type. The set of configuration files is as follows:
- default.config - this file stores all settings available when working with the Config class in API.
- default.controls - this file stores keyboard control keys and settings defining the mouse behavior. These settings are configured via the UnigineEditor (Windows -> Settings -> Runtime -> Controls).
- default.boot - this is the main configuration file, it stores information about location of other configuration files (necessary if the main configuration file is moved to another location). It contains Engine startup parameters, such as paths to GUI skin, loading screens, log-file, system and UnigineEditor cache files, extern defines, console commands, and other startup command-line parameters plus a group of world manager settings.Values stored in this config file are overridden by the command-line parameters specified at the Engine startup.
- default.user - this file stores various personal settings, such as helpers (wireframe, profiler, etc.) This configuration file should be added to the ignore list of your Version Control System (VCS) as it stores preferences of a particular user.
The settings from these files are read by the Engine on the application start-up and used for engine initialization.
By default, the set of configuration files is created automatically on project creation.
Configuration File Format#
The configuration file has the following format:
<config version="2.12"> <item name="option_name" type="option_type">option_value</item> ... <item name="option_name" type="option_type">option_value</item> </config>
Each item corresponds to one setting:
- option_name - a name of the engine-related and project-related setting. It is the same as a name of the corresponding console variable.
- option_type - a type of the setting: bool, int, float, string.
To read values from the configuration file and write them back, use functionality of the Config class. Use the appropriate methods depending on the type of the target item.
Setting Startup Options via Configuration File#
The application start-up options can be set via both the command-line and the unigine.boot configuration file.
The CLI options specified on the application start-up always take precedence over the ones stored in the configuration file. Some of the CLI options can be changed through the console, so they are automatically stored in the configuration file (this way, after the application is quit, they will be restored on the next start-up). However, there are command-line options that don't change the configuration file, namely:
For example, if you specify the -video_app command-line option on the application start-up, the corresponding setting video_app in the configuration file will be ignored.