shown in other instead.
Building a Project
Before your project can be distributed to users, it must be properly built. Building a project ensures that all content and code, including all necessary libraries, is up to date, in the proper format, and placed to a proper location to run on the desired target platform.
To build your project via UnigineEditor, perform the following:
- In UnigineEditor, click File -> Create Build. The Create Build window will open.
- Specify the required settings and click Create Build.
For building C# Component System projects, Component System should be initialized successfully.
By default, the build includes the following:
- core.ung and scripts.ung
- *.cache files
- Plugins added via SDK browser
If plugins are added via code, they should be added to the build as user files.
- All assets and their runtimes from the data/ folder and from all mount points
Runtimes are copied together with their *.meta (json) files.
- Texture cache from the data/.cache_textures folder
- guids.db file stored in the data/ folder
- Sound library
- Launcher file or files
- Main executable files
- Files added by user
|Build Type||Type of the build that defines which binaries are copied:
If the project's SDK is unavailable, this option is unavailable, as well. In this case, Build Type is defined by the build of UNIGINE Engine selected at the project creation.
|Project Name||Name of the output executable or .bat/.sh file|
|Build Folder||Path to the output folder where the build is going to be stored
You shouldn't create this folder inside your project folder, as it may significantly increase its size.
Build folder should be empty. Otherwise, its contents will be deleted.
|Default World||The world that is loaded when the application is started. If no world is selected, a black screen would be displayed when running the application.|
|Precompile Shaders||If enabled, generates shaders for the current Video API.
Shader cache increases performance and reduces spikes and freezes in the release application, which makes it very important for the release build. If the shaders have already been precompiled, selecting this box won't affect the build time.
You may require forced shader compilation in specific cases.
Launcher Default Settings#
|Type||Type of the launcher:
|Banner Image||The image to be displayed in the launcher. Available for GUI-based launcher only.
To assign an image, drag it from the Asset Browser.
Only PNG images can be used.
|Use OpenVR||Check this box, if your project is intended for OpenVR. This will enable OpenVR mode selection in the application launcher.|
|Use Oculus||Check this box, if your project is intended for Oculus. This will enable Oculus mode selection in the application launcher.|
|Use Varjo||Check this box, if your project is intended for Varjo. This will enable Varjo mode selection in the application launcher.|
|Resolution||The resolution of the application screen. Multiple resolutions can be selected. The resolution that is clicked upon is set as default.|
|Fullscreen||If enabled, the application is run in the Fullscreen mode.|
|Binary||Type of the binary to be selected by default in the launcher, if the selected build type is Development build:
|Video Debug||Toggling the debug context of the Graphics API. Available for the Development build type only.|
|Release App / Development App / Debug App||
Path to the corresponding binary to be run. The binary depends on the type of build.
This option is for the projects that do not use C# Component System.
Note that the binary is defined automatically, if it remains located in the bin/ folder. If it has been moved elsewhere or rearranged in some other way, the path to the file is to be set manually.
|Arguments||Additional start-up command-line options.|
UnigineEditor creates the <project_name>.lconfig file that Launcher uses to run the app. If a user changes any parameters and runs the app, the changes are saved in <project_name>.lconfig. Closing Launcher without running it discards any changes.
Copy User Files#
User files are added to the build folder by filling in the table with two columns:
- From (Absolute Path) — an absolute path to a source file or folder. Folders can be specified using wildcards.
- To (Relative Path) — path to the destination folder that is relative of the Build Folder. It can be a folder name where the file or files are copied to, or a folder and a file name, i.e. the copied file can be renamed as well.
There are some rules for adding user files to the build folder:
|From (Absolute Path)||To (Relative Path)||Comment|
|All files and folders inside <folder_name> will be recursively copied. Thus, it doesn't matter if you use slashes or not.|
|One file with the name indicated in the From column will be copied into <output_folder>\folder_with_pictures\|
But: 123.jpg (or 123.pmg)
|The file will be renamed.
However, if the target file extension is written incorrectly (differs from the actual file extension), a new folder with such name will be created instead, i.e. the resulting path of the example destination files will be:
When files with the same name are copied to one folder, their content is checked. If it's the same file, it would be copied once without any warning. However, if names are the same but the files are different, the dialog window will pop up to request which file should be copied.
Wildcards can also be used to define the rules for copying user files.
|From (Absolute Path)||To (Relative Path)||Comment|
|C:\test\<folder_name>\*.tga||<tga_pictures>||All files with the indicated extension from the selected folder will be copied to the specified folder.|
|C:\test\<folder_name>\ab*z.png||<another_folder_name>||All files with the name starting from ab and ending with z.png from the selected folder will be copied to the specified folder.|
|C:\test\<folder_name>\nn*||<another_folder_name>||All files with the name starting from nn from the selected folder will be copied to the specified folder.|
|C:\*.ung||///\\\/one\\\\\\////two\\///||Slashes work differently for Windows and Linux.
slashes are transformed to backslashes, all backslashes are merged into one.
all slashes are merged into one, but backslashes are not transformed to slashes.
Project files can be encrypted using the UNIGINE-native UNG archive format. UNG files are transparent to the engine, and their content is handled as not packed. To save your files in UNG format, use the Archiver tool.
- Data streaming doesn't work for UNG/ZIP contents.
- The maximum size of the archive is 2 GB.