# Configuration Files (CPP) All global engine-related and project-related settings are grouped and stored in separate configuration files. Each configuration file is an XML file that stores settings of a certain type. The set of configuration files is as follows: - *`*.boot`* - this is the main [boot configuration file](#boot). - *`*.config`* - this file stores all [custom application settings](#config). - *`*.controls`* - this file stores [controls configuration](#controls). - *`*.global`* - this file stores [global project settings](#global), such as custom render, surface, and material parameters. - *`*.user`* - this file stores [various personal settings](#user), such as helpers (wireframe, profiler, etc.). > **Notice:** The extension of each configuration file doesn't matter, however, it is recommended to use these extensions for consistency. 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 default configuration files is created automatically on [project creation](../sdk/projects/index_cpp.md#creation) in the project's `data/configs` folder available as a separate `configs` section of the Asset Browser. ![](config_files.png) *Configuration files in theAsset Browser* The `*.boot` configuration file stores the information about location of other configuration files for convenience. The path to the boot configuration file is set by using the *[-boot_config](../code/command_line.md#boot_config)* command-line option on the application start-up. The paths to the configuration files can be both absolute or relative. An absolute path is always used as is. If a relative path is specified, searching of the configuration file is performed as follows: 1. If the *[-project_name](../code/command_line.md#project_name)* CLI option is set, the project folder in the User profile will be checked first for the configuration file. At that, only the name of the specified file will be checked. For example, if you run the application as follows: ```bash bin/main_x64d.exe -project_name "my_project" -boot_config "configs/my_config.boot" ``` The engine will check the `my_config.boot` file in the following folder: - On Windows, `C:/Users//my_project/data/configs/` - On Linux, `/home//.my_project/data/configs/` 2. By default, the path to the configuration file will be checked relative to the *[-data_path](../code/command_line.md#data_path)*. 3. If the configuration file isn't found, the engine will try to create a default file relative to the `data` folder or in the project folder specified in the *-project_name*. > **Notice:** If the configuration files are stored in a [`*.ung` package](../principles/filesystem/index_cpp.md#types), they won't be loaded and, therefore, the engine will be initialized with the default settings. However, when the file system is initialized, you can specify the path to the configuration files stored in the package via the set of corresponding console commands: > - [`boot_config`](../code/console/index.md#boot_config) > - [`config`](../code/console/index.md#config) > - [`controls_config`](../code/console/index.md#controls_config) > - [`global_config`](../code/console/index.md#global_config) > - [`user_config`](../code/console/index.md#user_config) > > Then you can load the configuration files by using the corresponding *[`*_load`](../code/console/index.md#boot_config_load)* console commands. ## Startup Configuration This is the main configuration file containing the following Engine startup parameters: - Paths to GUI skin, log-file, system and UnigineEditor cache files. - [Boot and Splash screen](../code/gui/screens/index.md) settings. - Extern defines. - Console commands. - [Startup command-line parameters](../code/command_line.md) and a group of world manager settings. - Information about location of other configuration files. Expand the following spoiler to see an example of boot configuration file:
example.boot | Close ```xml core/gui/ log.txt core/unigine.usc unigine.cache editor.cache auto auto Project Name plugins/ ../extra/plugins/ OpenVR AdditionalPlugin 0 0 1 1 0 configs/default.config core/gui/console.ttf 16384 16 configs/default.controls 1 16 2 2 1 8 1 1 1 1 1 0 0 0 1 1920 1080 1 256 1 50 1 core/gui/font.ttf 13 0 0 1 64 1 0 33ff81e1-c170-5bb9-6995-d76d2664cd27 0 200 configs/default.user 0 0 0 0 0 0 0 1 0 0 0 0 1 1 3 0 0 0 2 1 1 4 1 0 0 0 7 2 0 1 2 0 0 1 0 0 0 0 0 0 0 32 0.0166666675 1 1 60 2 1 128 128 1 570 400 0, 0, 0, 0 0.5, 0.33, 0.5, 0.5 16 textures/boot_screen.png fonts/boot_screen_font.ttf Project Name

]]>
Custom message for engine initialization. Custom message for file system initialization. Custom message for materials initialization. Custom message for materials pre-loading. Custom message for properties initialization. Custom message for static meshes initialization. Custom message for shaders compilation.
```
By default, the `configs/default.boot` file is used. To run the application with another boot configuration file, specify the path to it using the *[-boot_config](../code/command_line.md#boot_config)* command-line option. The boot configuration file has the following structure: ```xml value ... value ... ... ``` The application start-up options can be set via both the command-line and the boot configuration file. > **Notice:** Values stored in this config file are overridden by the [command-line parameters](../code/command_line.md) specified at the Engine startup. 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. The configuration file contains the following parameters: - The **autosave** attribute enables automatic saving of start-up configuration to the file on loading, closing, and saving the world, as well as on the Engine shutdown. - A set of start-up CLI options: | - [*gui_path*](../code/command_line.md#gui_path) - [*engine_log*](../code/command_line.md#engine_log) - [*system_script*](../code/command_line.md#system_script) | - [*cache_path*](../code/command_line.md#cache_path) - [*system_cache*](../code/command_line.md#system_cache) | - [*editor_cache*](../code/command_line.md#editor_cache) - [*video_app*](../code/command_line.md#video_app) - [*sound_app*](../code/command_line.md#sound_app) | - [*extern_define*](../code/command_line.md#extern_define) - [*console_command*](../code/command_line.md#console_command) | |---|---|---|---| - **window_title** - title to be set for the application window. - **plugin_paths** - a list of [paths to directories](../code/command_line.md#plugin_path) that contain plugins. ```xml plugins/ ../extra/plugins/ ``` > **Notice:** All specified plugin paths (*plugin_path*) will be ignored, if at least one *-plugin_path* is specified in the command-line. - **extern_plugins** - a list of [plugin libraries](../code/command_line.md#extern_plugin) to be loaded. ```xml FBXImporter CADImporter OpenVR ``` - The **console** section contains the console variables to be defined at the engine start-up: | - [***config***](../code/console/index.md#config) - [***controls_config***](../code/console/index.md#controls_config) - [***user_config***](../code/console/index.md#user_config) - [*async_log_mode*](../code/console/index.md#async_log_mode) - [*async_log_priority*](../code/console/index.md#async_log_priority) - [*background_update*](../code/console/index.md#background_update) - [*console_font*](../code/console/index.md#console_font) - [*console_size*](../code/console/index.md#console_size) - [*filesystem_mmap*](../code/console/index.md#filesystem_mmap) - [*dpi_awareness*](../code/console/index.md#dpi_awareness) - [*auto_dpi_scaling*](../code/console/index.md#auto_dpi_scaling) - [*mesh_procedural_path*](../code/console/index.md#mesh_procedural_path) - [*mesh_procedural_read_only*](../code/console/index.md#mesh_procedural_read_only) | - [*process_priority*](../code/console/index.md#process_priority) - [*profiler_font*](../code/console/index.md#profiler_font) - [*profiler_size*](../code/console/index.md#profiler_size) - [*splash_screen*](../code/console/index.md#splash_screen) - [*starting_world*](../code/console/index.md#starting_world) - [*swap_delay_warning*](../code/console/index.md#swap_delay_warning) - [*swap_delay_warning_time*](../code/console/index.md#swap_delay_warning_time) - [*video_adapter*](../code/console/index.md#video_adapter) - [*video_debug*](../code/console/index.md#video_debug) - [*video_debug_shader*](../code/console/index.md#video_debug_shader) - [*video_offscreen*](../code/console/index.md#video_offscreen) | - [*main_window*](../code/console/index.md#main_window) - [*main_window_fullscreen*](../code/console/index.md#main_window_fullscreen) - [*main_window_size*](../code/console/index.md#main_window_size) - [*main_window_resizable*](../code/console/index.md#main_window_resizable) - [*main_window_auto_restart*](../code/console/index.md#main_window_auto_restart) - [*main_window_borders*](../code/console/index.md#main_window_borders) - [*main_window_fullscreen_display*](../code/console/index.md#main_window_fullscreen_display) - [*main_window_fullscreen_display_mode*](../code/console/index.md#main_window_fullscreen_display_mode) - [*world_manager_images_memory*](../code/console/index.md#world_manager_images_memory) - [*world_manager_meshes_memory*](../code/console/index.md#world_manager_meshes_memory) - [*materials_preload*](../code/console/index.md#materials_preload) - [*shaders_preload*](../code/console/index.md#shaders_preload) - [*dlss_application_id*](../code/console/index.md#dlss_application_id) | |---|---|---| - The **screen** section lists the [boot screen](../code/gui/screens/index.md#boot) parameters. To read values from the configuration file and write them back, use functionality of the *[BootConfig](../api/library/engine/class.bootconfig_cpp.md)* class. ## Application Configuration This file stores all custom application settings. By default, the `configs/default.config` file is used. To use another configuration file, specify the path to it in the [boot configuration file](#boot). The configuration file has the following format: ```xml option_value ... option_value ``` Expand the following spoiler to see an example of application configuration file:
example.config | Close ```xml soldier 1 100 ```
The **autosave** attribute enables automatic saving of configuration settings to the file on loading, closing, and saving the world, as well as on the Engine shutdown. 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](../code/console/index.md) 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](../api/library/engine/class.config_cpp.md)* class. Use the appropriate methods depending on the type of the target item. ## Controls Configuration This file stores *keyboard control keys* and settings defining the *mouse behavior*. These settings are configured via the UnigineEditor (*[Windows -> Settings -> Runtime -> Controls](../editor2/settings/controls/index.md)*). > **Notice:** The *[ControlsApp](../api/library/controls/class.controlsapp_cpp.md)* class used to manage this configuration is considered deprecated - for handling input in new projects, use the *[Input](../api/library/controls/class.input_cpp.md)* class instead. The `.controls` file itself remains in use. By default, the `configs/default.controls` file is used. To use another configuration file, specify the path to it in the [boot configuration file](#boot). The controls configuration file has the following format: ```xml ESC 0 2 0 1 1 W S ... LEFT ... ``` Expand the following spoiler to see an example of controls configuration file:
example.controls | Close ```xml ESC 0 2 0 1 1 W S A D UP DOWN LEFT RIGHT Q E LEFT_SHIFT ENTER UNKNOWN F5 F6 F12 UNKNOWN LEFT ```
The parameters are: - The **autosave** attribute enables automatic saving of controls configuration to the file on loading, closing, and saving the world, as well as on the Engine shutdown. - **remove_grab_key** - the key that releases the mouse grab. - **controls_always_run** - sets the **[Always Run](../editor2/settings/controls/index.md)** option. - **controls_mouse_handle** - sets the **[Mouse Handle](../editor2/settings/controls/index.md)** option. - **controls_mouse_inverse** - sets the **[Invert Mouse](../editor2/settings/controls/index.md)** option. - **controls_mouse_raw_input** - enables raw (unaccelerated) mouse input. - **controls_mouse_sensitivity** - sets the **[Mouse Speed](../editor2/settings/controls/index.md)** option. - **keys** - keyboard key bindings for the *[STATE_*](../api/library/controls/class.controls_cpp.md#STATE_FORWARD)* states of the *Controls* class. Each child element is named after the state (FORWARD, BACKWARD, etc.) and contains the bound key name. Unassigned states have the UNKNOWN value. - **mouse_buttons** - mouse button bindings for the same *[STATE_*](../api/library/controls/class.controls_cpp.md#STATE_FORWARD)* states. To manage the controls configuration, use functionality of the *[ControlsApp](../api/library/controls/class.controlsapp_cpp.md)* class or classes derived from the *[Controls](../api/library/controls/class.controls_cpp.md)* class. ## Global Configuration This file stores global project settings shared by everyone working on the project: declarations of [custom surface and material parameters](../content/materials/custom_parameters/index.md), and [custom render parameters](../content/materials/render_parameters.md) along with their values. By default, the `configs/default.global` file is used. To use another configuration file, specify the path to it using the *`-global_config`* command-line option. The global configuration file has the following format: ```xml value ... ``` Expand the following spoiler to see an example of global configuration file:
example.global | Close ```xml profiling_dump 0.7 1 0.9 0.8 ```
The **autosave** attribute enables automatic saving of global configuration settings to the file on loading, closing, and saving the world, when the application window loses focus, as well as on the Engine shutdown. It is disabled by default, so the settings are written only on an explicit save. > **Notice:** This file is not meant to be edited by hand. It is written by *UnigineEditor* when you press *Save* on the *Settings -> Runtime -> World -> Render -> [Custom Parameters](../editor2/settings/render_settings/custom_parameters/index.md)* page, by the *[`global_config_save`](../code/console/index.md#global_config_save)* console command, or by the *[*GlobalConfig::save()*](../api/library/engine/class.globalconfig_cpp.md#save_int)* method. If the file doesn't exist on the application start-up, it is created with the default settings. The file has the following sections: - The **console** section lists values of the [console](../code/console/index.md) variables saved to the `*.global` configuration file.
Console commands in *.global configuration file | Close - [profiling_dump_dir](../code/console/#profiling_dump_dir)
- The **render** section stores the declarations of custom parameters and the values of the ones that belong to the project as a whole: - **parameters** - [custom render parameters](../content/materials/render_parameters.md). Each **parameter** element keeps the name, the GUID, the type, the [Dynamic](../editor2/settings/render_settings/custom_parameters/index.md#dynamic) flag, and the value of the parameter, because a render parameter is global and has a single value for the whole project. - **surface_custom_parameters** and **material_custom_parameters** - [declarations of custom surface and material parameters](../content/materials/custom_parameters/declaring_and_setting_cpp.md#declare_storage). Each element is named after the parameter and keeps its GUID, type, default value, and the range of values. Only the declarations are stored here: values of a surface are saved in the world, values of a material - in its `*.mat` file. > **Notice:** Values written on a surface or a material are stored under the GUID of the parameter, so a parameter can be renamed or moved up and down the list without losing them. For the same reason the GUIDs in this file should be preserved: replacing them detaches the values already written into the assets of the project. To control the global configuration file, use functionality of the *[GlobalConfig](../api/library/engine/class.globalconfig_cpp.md)* class. ## User Configuration This file stores various personal settings, such as helpers (wireframe, profiler, etc.). By default, the `configs/default.user` file is used. To use another configuration file, specify the path to it in the [boot configuration file](#boot). > **Notice:** This configuration file should be added to the *ignore* list of your [Version Control System](../editor2/assets_workflow/version_control/index.md#ignore) (VCS) as it stores preferences of a particular user. The user configuration file has the following format: ```xml value ... ``` Expand the following spoiler to see an example of user configuration file:
example.user | Close ```xml 75 BACK_QUOTE 0 14 20 2 0 1 500 1 200 0 0 0 0 500 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 0 0 0 -1 0 0 0 -1 0 0 0 0 0 -1 0 0 -1 0 -1 0 0 -1 0 0 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 7 0 0 0 0 0 -1 0 0 tga 0 0 1 0 0 0 1 0 0 0 1 0 500 0 ```
The **autosave** attribute enables automatic saving of user configuration settings to the file on loading, closing, and saving the world, as well as on the Engine shutdown. This file stores personal settings such as helpers (wireframe, profiler, etc.) and various debug visualization options. In the [Console](../code/console/index.md) article, all such variables are marked as saved to the `*.user` configuration file.
Console commands in *.user configuration file | Close - [bind](../code/console/#bind) - [console_key](../code/console/#console_key) - [console_key_modifier](../code/console/#console_key_modifier) - [console_height](../code/console/#console_height) - [console_onscreen](../code/console/#console_onscreen) - [console_onscreen_font_size](../code/console/#console_onscreen_font_size) - [console_onscreen_height](../code/console/#console_onscreen_height) - [console_onscreen_time](../code/console/#console_onscreen_time) - [console_wrapping](../code/console/#console_wrapping) - [materials_reload_event](../code/console/#materials_reload_event) - [show_visualizer](../code/console/#show_visualizer) - [show_fps](../code/console/#show_fps) - [visualizer_fix_flicker](../code/console/#visualizer_fix_flicker) - [world_show_spatial](../code/console/#world_show_spatial) - [world_show_visualizer](../code/console/#world_show_visualizer) - [render_show_triangles](../code/console/#render_show_triangles) - [render_show_voxel_probe_visualizer](../code/console/#render_show_voxel_probe_visualizer) - [world_show_handler](../code/console/#world_show_handler) - [world_handler_3d](../code/console/#world_handler_3d) - [world_handler_distance](../code/console/#world_handler_distance) - [render_show_decals](../code/console/#render_show_decals) - [render_show_landscape_albedo](../code/console/#render_show_landscape_albedo) - [render_show_landscape_mask](../code/console/#render_show_landscape_mask) - [render_show_landscape_terrain_vt_streaming](../code/console/#render_show_landscape_terrain_vt_streaming) - [physics_show_collision_surfaces](../code/console/#physics_show_collision_surfaces) - [physics_show_contacts](../code/console/#physics_show_contacts) - [physics_show_joints](../code/console/#physics_show_joints) - [physics_show_shapes](../code/console/#physics_show_shapes) - [physics_show_shapes_distance](../code/console/#physics_show_shapes_distance) - [experimental_navigation_show_mesh](../code/console/#experimental_navigation_show_mesh) - [experimental_navigation_show_mesh_mode](../code/console/#experimental_navigation_show_mesh_mode) - [experimental_navigation_show_mesh_depth_test](../code/console/#experimental_navigation_show_mesh_depth_test) - [experimental_navigation_show_mesh_tiles](../code/console/#experimental_navigation_show_mesh_tiles) - [render_show_occluder](../code/console/#render_show_occluder) - [render_show_queries](../code/console/#render_show_queries) - [show_profiler](../code/console/#show_profiler) - [show_profiler_charts](../code/console/#show_profiler_charts) - [show_profiler_table](../code/console/#show_profiler_table) - [show_profiler_experimental_navigation](../code/console/#show_profiler_experimental_navigation) - [show_profiler_generic](../code/console/#show_profiler_generic) - [show_profiler_memory](../code/console/#show_profiler_memory) - [show_profiler_memory_object](../code/console/#show_profiler_memory_object) - [show_profiler_physics](../code/console/#show_profiler_physics) - [show_profiler_render](../code/console/#show_profiler_render) - [show_profiler_thread](../code/console/#show_profiler_thread) - [show_profiler_world](../code/console/#show_profiler_world) - [microprofile_webserver_frames](../code/console/#microprofile_webserver_frames) - [microprofile_dump_frames](../code/console/#microprofile_dump_frames) - [render_show_cascades](../code/console/#render_show_cascades) - [screenshot_extension](../code/console/#screenshot_extension) - [render_show_queries](../code/console/#render_show_queries) - [render_show_decals](../code/console/#render_show_decals) - [render_show_scissors](../code/console/#render_show_scissors) - [render_show_occluder](../code/console/#render_show_occluder) - [render_show_cascades](../code/console/#render_show_cascades) - [render_show_visualizer_distance](../code/console/#render_show_visualizer_distance) - [render_show_alpha_test](../code/console/#render_show_alpha_test) - [render_show_depth_pre_pass](../code/console/#render_show_depth_pre_pass) - [render_show_immovable](../code/console/#render_show_immovable) - [render_show_dynamic](../code/console/#render_show_dynamic) - [render_show_transparent](../code/console/#render_show_transparent) - [render_show_transparent_gbuffer](../code/console/#render_show_transparent_gbuffer) - [render_show_transparent_lighting_ambient](../code/console/#render_show_transparent_lighting_ambient) - [render_show_transparent_lighting_environment_probe](../code/console/#render_show_transparent_lighting_environment_probe) - [render_show_transparent_lighting_voxel_probe](../code/console/#render_show_transparent_lighting_voxel_probe) - [render_show_transparent_lighting_planar_probe](../code/console/#render_show_transparent_lighting_planar_probe) - [render_show_transparent_lighting_light_omni](../code/console/#render_show_transparent_lighting_light_omni) - [render_show_transparent_lighting_light_proj](../code/console/#render_show_transparent_lighting_light_proj) - [render_show_transparent_lighting_light_world](../code/console/#render_show_transparent_lighting_light_world) - [render_show_ambient](../code/console/#render_show_ambient) - [render_show_geodetic_pivot](../code/console/#render_show_geodetic_pivot) - [render_show_landscape_mask](../code/console/#render_show_landscape_mask) - [render_show_landscape_albedo](../code/console/#render_show_landscape_albedo) - [render_show_textures](../code/console/#render_show_textures) - [render_show_textures_offset](../code/console/#render_show_textures_offset) - [render_show_textures_number](../code/console/#render_show_textures_number) - [render_show_triangles](../code/console/#render_show_triangles) - [render_show_vertex_color](../code/console/#render_show_vertex_color) - [render_show_nodes_interaction_grass](../code/console/#render_show_nodes_interaction_grass) - [render_show_nodes_interaction_clutter](../code/console/#render_show_nodes_interaction_clutter) - [render_show_nodes_interaction_trigger](../code/console/#render_show_nodes_interaction_trigger)
To control the user configuration file, use functionality of the *[UserConfig](../api/library/engine/class.userconfig_cpp.md)* class.