This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Файлы конфигурации

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: Все глобальные настройки движка и проекта сгруппированы и сохранены в отдельных файлах конфигурации. Каждый файл конфигурации - это XML-файл, в котором хранятся настройки определенного типа. Набор файлов конфигурации выглядит следующим образом:

Примечание
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 in the project's data/configs folder available as a separate configs section of the Asset Browser. По умолчанию набор файлов конфигурации по умолчанию создается автоматически при создании проекта в папке проекта data/configs, доступной как отдельный раздел configs в браузере ресурсов.

Configuration files in the Asset Browser Файлы конфигурации в Asset Browser

The *.boot configuration file stores the information about location of other configuration files for convenience. The path to the startup configuration file is set by using the -boot_config command-line option on the application start-up. В файле конфигурации *.boot для удобства хранится информация о расположении других файлов конфигурации. Путь к файлу загрузочной конфигурации задается с помощью параметра командной строки -boot_config при запуске приложения.

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 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:
    Shell-команды
    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/<username>/my_project/data/configs/
    • On Linux, /home/<username>/.my_project/data/configs/
    Если задана опция CLI -project_name, папка проекта в профиле пользователя будет проверяться сначала на наличие файла конфигурации. При этом будет проверяться только имя указанного файла. Например, если вы запустите приложение следующим образом:
    Shell-команды
    bin/main_x64d.exe -project_name "my_project" -boot_config "configs/my_config.boot"
    Движок проверит файл my_config.boot в следующей папке:
    • В Windows, C:/Users/<username>/my_project/data/configs/
    • В Linux, /home/<username>/.my_project/data/configs/
  2. By default, the path to the configuration file will be checked relative to the -data_path. По умолчанию путь к файлу конфигурации будет проверяться относительно -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. Если файл конфигурации не найден, движок попытается создать файл по умолчанию относительно папки data или в папке проекта, указанной в -project_name.
Примечание
If the configuration files are stored in a .ung package, 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: Then you can load the configuration files by using the corresponding *_load console commands. Если файлы конфигурации хранятся в пакете .ung , они не будут загружены и, следовательно, движок будет инициализирован с настройками по умолчанию. Однако при инициализации файловой системы вы можете указать путь к файлам конфигурации, хранящимся в пакете, с помощью набора соответствующих консольных команд: Затем вы можете загрузить файлы конфигурации, используя соответствующие консольные команды *_load.

Startup ConfigurationКонфигурация запуска#

This is the main configuration file containing the following Engine startup parameters: Это основной файл конфигурации, содержащий следующие параметры запуска Engine:

  • Paths to GUI skin, log-file, system and UnigineEditor cache files; Пути к скинам графического интерфейса, лог-файлу, системе и файлам кеша UnigineEditor;
  • Boot and Splash screen settings; Настройки Boot и Splash экранов;
  • Extern defines; Внешние определения (defines);
  • Console commands; Консольные команды;
  • Startup command-line parameters and a group of world manager settings; Параметры командной строки запуска и группа настроек менеджера мира;
  • Information about location of other configuration files. Информация о расположении других файлов конфигурации.

Expand the following spoiler to see an example of startup configuration file: Разверните следующий спойлер, чтобы увидеть пример файла конфигурации запуска:

Исходный код (XML)
<?xml version="1.0" encoding="utf-8"?>
<boot version="2.17" autosave="0">
	<gui_path>core/gui/</gui_path>
	<engine_log>log.txt</engine_log>
	<system_script>core/unigine.usc</system_script>
	<cache_path/>
	<system_cache>unigine.cache</system_cache>
	<editor_cache>editor.cache</editor_cache>
	<video_app>auto</video_app>
	<sound_app>auto</sound_app>
	<extern_define/>
	<console_command/>
	<window_title>Project Name</window_title>
	<plugin_paths>
		<path>plugins/</path>
		<path>../extra/plugins/</path>
	</plugin_paths>
	<extern_plugins>
		<plugin>OpenVR</plugin>
		<plugin>AdditionalPlugin</plugin>
	</extern_plugins>
	<console>
		<async_log_mode>0</async_log_mode>
		<async_log_priority>0</async_log_priority>
		<background_update>0</background_update>
		<config>configs/default.config</config>
		<console_font>core/gui/console.ttf</console_font>
		<console_size>16</console_size>
		<controls_config>configs/default.controls</controls_config>
		<filesystem_mmap>1</filesystem_mmap>
		<gl_async_buffer>128</gl_async_buffer>
		<gl_async_buffer_indices>16</gl_async_buffer_indices>
		<gl_async_buffer_synchronization>1</gl_async_buffer_synchronization>
		<gl_render_skip_errors>0</gl_render_skip_errors>
		<gl_use_debug_info>0</gl_use_debug_info>
		<process_priority>1</process_priority>
		<profiler_font>core/gui/font.ttf</profiler_font>
		<profiler_size>13</profiler_size>
		<splash_screen>0</splash_screen>
		<starting_world>my_world</starting_world>
		<textures_cache_preload>1</textures_cache_preload>
		<user_config>configs/default.user</user_config>
		<video_adapter>0</video_adapter>
		<video_debug>0</video_debug>
		<video_debug_shaders>0</video_debug_shaders>
		<main_window_fullscreen>0</main_window_fullscreen>
		<main_window_size>1600 900</main_window_size>
		<main_window_resizable>1</main_window_resizable>
		<main_window_auto_restart>1</main_window_auto_restart>
		<main_window_borders>1</main_window_borders>
		<main_window_fullscreen_display>0</main_window_fullscreen_display>
		<main_window_fullscreen_display_mode>0</main_window_fullscreen_display_mode>
		<world_manager_images_memory>128</world_manager_images_memory>
		<world_manager_meshes_memory>128</world_manager_meshes_memory>
	</console>
	<screen>
		<width>570</width>
		<height>400</height>
		<background_color>0, 0, 0, 0</background_color>
		<transform>0.5, 0.33, 0.5, 0.5</transform>
		<threshold>16</threshold>
		<texture>textures/boot_screen.png</texture>
		<font>fonts/boot_screen_font.ttf</font>
		<text>
			<![CDATA[
				<p align="center">
					<font color="#606060" size="16">
						<xy y="%100" dy="-20"/>Project Name
					</font>
				</p>
			]]>
		</text>
		<messages>
			<engine_init>Custom message for engine initialization.</engine_init>
			<file_system_init>Custom message for file system initialization.</file_system_init>
			<materials_init>Custom message for materials initialization.</materials_init>
			<properties_init>Custom message for properties initialization.</properties_init>
			<plugins_init>Custom message for plugins initialization.</plugins_init>
			<shaders_compilation>Custom message for shaders compilation.</shaders_compilation>
		</messages>
	</screen>
</boot>

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 command-line option. По умолчанию используется файл configs/default.boot. Чтобы запустить приложение с другим файлом конфигурации загрузки, укажите путь к нему с помощью параметра командной строки -boot_config.

The boot configuration file has the following structure: Файл конфигурации загрузки имеет следующую структуру:

Исходный код (XML)
<boot version="2.12" autosave="0">
	<cli_option>value</cli_option>
	...
	<console>
		<console_command>value</console_command>
		...
	</console>
	<screen>
		...
	</screen>
</boot>

The application start-up options can be set via both the command-line and the boot configuration file. The CLI options specified on the application start-up always take precedence over the ones stored in the configuration file. Параметры запуска приложения можно настроить как из командной строки, так и из файла конфигурации загрузки. Параметры CLI , указанные при запуске приложения, всегда имеют приоритет над параметрами, хранящимися в файле конфигурации.

Примечание
Values stored in this config file are overridden by the command-line parameters 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. Значения, хранящиеся в этом файле конфигурации, переопределяются параметрами командной строки , указанными при запуске Engine. Например, если вы укажете опцию командной строки -video_app при запуске приложения, соответствующий параметр video_app в файле конфигурации будет проигнорирован.

The configuration file contains the following parameters: Файл конфигурации содержит следующие параметры:

To read values from the configuration file and write them back, use functionality of the BootConfig class. Чтобы прочитать значения из файла конфигурации и записать их обратно, используйте функциональность класса BootConfig.

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. В этом файле хранятся все пользовательские настройки приложения. По умолчанию используется файл configs/default.config. Чтобы использовать другой файл конфигурации, укажите путь к нему в boot configuration file.

The configuration file has the following format: Файл конфигурации имеет следующий формат:

Исходный код (XML)
<config version="2.12" autosave="1">
	<item name="option_name" type="option_type">option_value</item>
	...
	<item name="option_name" type="option_type">option_value</item>
</config>

Expand the following spoiler to see an example of application configuration file: Разверните следующий спойлер, чтобы увидеть пример файла конфигурации приложения:

Исходный код (XML)
<?xml version="1.0" encoding="utf-8"?>
<config version="2.13" autosave="1">
	<player_avatar>soldier</player_avatar>
	<skip_curscenes>1</skip_curscenes>
	<bulletshell_lifetime>100</bulletshell_lifetime>
</config>

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. Атрибут autosave позволяет автоматически сохранять настройки конфигурации в файл при загрузке, закрытии и сохранении мира, а также при выключении движка.

Each item corresponds to one setting:Каждому item соответствует одна настройка:

  • 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_name - имя настройки движка и проекта. Это то же самое, что имя соответствующей переменной console .
  • option_type - a type of the setting: bool, int, float, string. option_type - тип настройки: 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. Чтобы прочитать значения из файла конфигурации и записать их обратно, используйте функциональность класса Config. Используйте соответствующие методы в зависимости от типа целевого элемента.

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). В этом файле хранятся клавиши управления клавиатурой и настройки, определяющие поведение мыши . Эти настройки настраиваются через UnigineEditor (Windows -> Settings -> Runtime -> Controls).

By default, the configs/default.controls file is used. To use another configuration file, specify the path to it in the boot configuration file. По умолчанию используется файл configs/default.controls. Чтобы использовать другой файл конфигурации, укажите путь к нему в boot configuration file.

The controls configuration file has the following format: Файл конфигурации элементов управления имеет следующий формат:

Исходный код (XML)
<controls version="2.12" autosave="1">
	<controls_always_run>1</controls_always_run>
	<controls_mouse_handle>0</controls_mouse_handle>
	<controls_mouse_inverse>0</controls_mouse_inverse>
	<controls_mouse_sensitivity>1</controls_mouse_sensitivity>
	<keys>
		<119/>
		...
	</keys>
	<buttons>
		<0/>
		...
	</buttons>
</controls>

Expand the following spoiler to see an example of controls configuration file: Разверните следующий спойлер, чтобы увидеть пример файла конфигурации элементов управления:

Исходный код (XML)
<?xml version="1.0" encoding="utf-8"?>
<controls version="2.13" autosave="1">
	<controls_always_run>0</controls_always_run>
	<controls_mouse_handle>0</controls_mouse_handle>
	<controls_mouse_inverse>0</controls_mouse_inverse>
	<controls_mouse_sensitivity>1</controls_mouse_sensitivity>
	<keys>
		<119/>
		<115/>
		<97/>
		<100/>
		<268/>
		<269/>
		<266/>
		<267/>
		<113/>
		<101/>
		<270/>
		<259/>
		<0/>
		<281/>
		<282/>
		<288/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
	</keys>
	<buttons>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<1/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
		<0/>
	</buttons>
</controls>

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. Атрибут autosave позволяет автоматически сохранять конфигурацию элементов управления в файл при загрузке, закрытии и сохранении мира, а также при выключении Engine.
  • controls_always_run - sets the Always Run option. controls_always_run - устанавливает опцию Always Run.
  • controls_mouse_handle - sets the Mouse Handle option. controls_mouse_handle - устанавливает опцию Mouse Handle.
  • controls_mouse_inverse - sets the Invert Mouse option. controls_mouse_inverse - устанавливает опцию Invert Mouse.
  • controls_mouse_sensitivity - sets the Mouse Speed option. controls_mouse_sensitivity - устанавливает опцию Mouse Speed.
  • keys - a set of key bindings to the STATE_* states of the Control class. keys - набор привязок клавиш к состояниям STATE_* класса Control.
  • buttons - a set of mouse button bindings to the STATE_* states of the Control class. buttons - набор привязок кнопок мыши к состояниям STATE_* класса Control.

To manage the controls configuration, use functionality of the ControlsApp class or classes derived from the Controls class. Для управления конфигурацией элементов управления используйте функциональность класса ControlsApp или классов, производных от класса Controls.

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. В этом файле хранятся различные личные настройки, такие как помощники (каркас, профилировщик и т. д.). По умолчанию используется файл configs/default.user. Чтобы использовать другой файл конфигурации, укажите путь к нему в boot configuration file.

Примечание
This configuration file should be added to the ignore list of your Version Control System (VCS) as it stores preferences of a particular user. Этот файл конфигурации следует добавить в список ignore вашей системы контроля версий (VCS), поскольку он хранит настройки конкретного пользователя.

The user configuration file has the following format: Файл конфигурации пользователя имеет следующий формат:

Исходный код (XML)
<?xml version="1.0" encoding="utf-8"?>
<config version="2.14.1.0" autosave="1">
	<parameter>value</parameter>
	...
</user>

Expand the following spoiler to see an example of user configuration file: Разверните следующий спойлер, чтобы увидеть пример файла конфигурации пользователя:

Исходный код (XML)
<?xml version="1.0" encoding="utf-8"?>
<user version="2.14.1.0" autosave="1">
	<console_height>75</console_height>
	<console_key>96</console_key>
	<console_onscreen>1</console_onscreen>
	<console_onscreen_font_size>14</console_onscreen_font_size>
	<console_onscreen_height>20</console_onscreen_height>
	<console_onscreen_time>2</console_onscreen_time>
	<console_wrapping>0</console_wrapping>
	<microprofile_dump_frames>500</microprofile_dump_frames>
	<microprofile_enabled>1</microprofile_enabled>
	<microprofile_webserver_frames>200</microprofile_webserver_frames>
	<physics_show_collision_surfaces>0</physics_show_collision_surfaces>
	<physics_show_contacts>0</physics_show_contacts>
	<physics_show_joints>0</physics_show_joints>
	<physics_show_shapes>0</physics_show_shapes>
	<render_show_alpha_test>0</render_show_alpha_test>
	<render_show_ambient>0</render_show_ambient>
	<render_show_cascades>0</render_show_cascades>
	<render_show_decals>0</render_show_decals>
	
	<render_show_geodetic_pivot>0</render_show_geodetic_pivot>
	<render_show_landscape_albedo>0</render_show_landscape_albedo>
	<render_show_landscape_mask>0</render_show_landscape_mask>
	<render_show_landscape_terrain_vt_streaming>0</render_show_landscape_terrain_vt_streaming>
	<render_show_lightmap_checker>0</render_show_lightmap_checker>
	<render_show_mipmaps>0</render_show_mipmaps>
	<render_show_occluder>0</render_show_occluder>
	<render_show_queries>0</render_show_queries>
	<render_show_scissors>0</render_show_scissors>
	<render_show_textures>0</render_show_textures>
	<render_show_textures_number>7</render_show_textures_number>
	<render_show_textures_offset>0</render_show_textures_offset>
	<render_show_transparent>0</render_show_transparent>
	<render_show_triangles>0</render_show_triangles>
	<render_show_voxel_probe_visualizer>0</render_show_voxel_probe_visualizer>
	<show_fps>0</show_fps>
	<show_profiler>0</show_profiler>
	<show_profiler_charts>1</show_profiler_charts>
	<show_visualizer>0</show_visualizer>
	<screenshot_extension>2</screenshot_extension>
	<visualizer_fix_flicker>1</visualizer_fix_flicker>
	<world_handler_3d>0</world_handler_3d>
	<world_handler_distance>500</world_handler_distance>
	<world_show_handler>3 4 56 57 58 59 60 61 62 63 48 49 50 51 52</world_show_handler>
	<world_show_spatial>0</world_show_spatial>
	<world_show_visualizer>55 56 57 58</world_show_visualizer>
	<console_bindings/>
</user>

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. Атрибут autosave позволяет автоматически сохранять пользовательские настройки конфигурации в файл при загрузке, закрытии и сохранении мира, а также при выключении Engine.

The following console variables are defined in the user configuration file: В файле конфигурации пользователя определены следующие консольные переменные:

To control the user configuration file, use functionality of the UserConfig class. Для управления файлом конфигурации пользователя используйте функциональность класса UserConfig.

Последнее обновление: 09.11.2023
Build: ()