Rebuild in Windows via Visual Studio
This article explains how you can rebuild the UNIGINE Engine and its components (samples, plugins, etc.) by using Visual Studio on the Windows platform.
Rebuilding UNIGINE Engine or Its Components#
Customization Options#
Apart from developing your project with UnigineScript, you can also customize the UNIGINE application C++ code. What exactly is available for customization depends on the version of UNIGINE SDK:
- With the limited binary/evaluation version you can only modify the following components:
- C++ plugins for the engine (in the evaluation version, some plugins cannot be rebuilt).
- The source code of UNIGINE-based sample applications.
You can also modify the source code of high-level scripts: just like all other scripts, they do not require recompilation.
- If you have the full source version, you can modify the entire UNIGINE codebase:
- The C++ source code of the engine itself.
- All UNIGINE standalone tools.
- C++ plugins for the engine.
- The source code of UNIGINE-based sample applications.
After customizing the code, recompilation of UNIGINE application or its libraries is required.
Rebuild the UNIGINE-Powered Application#
For Windows, 32-bit or 64-bit, debug or release, single or double coordinates precision versions can be compiled. To recompile both the UNIGINE engine (i.e. the dynamic library Unigine_*.dll) and application on its base (i.e. the main application main_*.exe), do the following: For compilation via MS Visual Studio:
- To rebuild the engine libraries:
- Open the solution file for Visual Studio: <UNIGINE_SDK>\source\engine\unigine_vs2013.vcxproj or <UNIGINE_SDK>\source\engine\unigine_vs2015.vcxproj. The postfix shows the version of Microsoft Visual Studio.
If you use Visual Studio 2017, open unigine_vs2015.vcxproj and click Upgrade.
- Specify the solution configuration: Debug, Debug-Double, Release or Release-Double.
- Choose Build -> Build Solution in the menu or press F7.
- Open the solution file for Visual Studio: <UNIGINE_SDK>\source\engine\unigine_vs2013.vcxproj or <UNIGINE_SDK>\source\engine\unigine_vs2015.vcxproj. The postfix shows the version of Microsoft Visual Studio.
- To rebuild the main application:
- Open <UNIGINE_SDK>\source\apps\main\main_vs2013.vcxproj or <UNIGINE_SDK>\source\apps\main\main_vs2015.vcxproj. The postfix shows the version of Microsoft Visual Studio.
If you use Visual Studio 2017, open main_vs2015.vcxproj and click Upgrade.
- Specify the solution configuration: Debug, Debug-Double, Release or Release-Double.
- Choose Build -> Build Solution in the menu or press F7.
- Open <UNIGINE_SDK>\source\apps\main\main_vs2013.vcxproj or <UNIGINE_SDK>\source\apps\main\main_vs2015.vcxproj. The postfix shows the version of Microsoft Visual Studio.
Rebuild Engine Plugins#
To rebuild engine C++ plugins, perform one of the following: >To rebuild a plugin with Microsoft Visual Studio, do the following:
- Open the solution of the necessary plugin to rebuild. All plugins are located in <UNIGINE_SDK>\source\plugins\.
- Specify the solution configuration: Debug, Debug-Double, Release or Release-Double.
- Choose Build -> Build Solution in the menu or press F7.
Rebuild Task-Specific Applications#
Some specific functionality is not supported by the main UNIGINE application. For that, you need to recompile separate applications (their binary executables).
To rebuild athe task-specific application with Microsoft Visual Studio, do the following:
- Open the solution of the necessary plugin to rebuild. All plugins are located in <UNIGINE_SDK>\source\plugins\.
- Specify the solution configuration: Debug, Debug-Double, Release or Release-Double.
- Choose Build -> Build Solution in the menu or press F7.
Rebuild Sample Applications#
In UNIGINE SDK, there are included sample applications that can be modified and used as templates to create your own applications.
To rebuild UNIGINE samples, you should do the following:
- Open the Visual Studio project file of the sample. Samples are located in the<UnigineSDK>\source\samples\ directory.
- Specify the solution configuration: Debug, Debug-Double, Release or Release-Double.
- Choose Build -> Build Solution in the menu or press F7.