Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Generate your Visual Studio C++ solution

Understand the Visual Studio C++ solution that Unity automatically generates.
Read time 1 minuteLast updated 23 days ago

When you build a project from Unity for Universal Windows Platform (UWP), Unity automatically generates a Visual Studio solution.

Create your Visual Studio C++ solution

Unity generates a Visual Studio solution containing the following projects:

Project

Description

projectNameContains your main project code. Visual Studio builds this project into an application package, which you can deploy to a device or uploaded to the Microsoft Store.

Note: Unity doesn’t overwrite this project when you build on top of it.
Unity DataContains all the Unity-specific files you need to build your project, such as assets.
Il2CppOutputProjectContains the generated C++ code which Unity converts from managed assemblies.

Note: This project is overwritten every time you build over it.

Visual Studio build configurations

Unity provides the following build configuration options in Visual Studio:

Configuration

Description

DebugUse Debug to debug your code. This configuration:
- Disables all optimization.
- Preserves all debugging information in the code.
- Results in code that runs slowly.
- Results in the fastest build time.
ReleaseUse Release to profile your game. This configuration:
- Enables code optimizations.
MasterUse Master for game submission and final testing. This configuration:
- Disables the profiler.
- Results in the same build time as the Release configuration.
- Results in the same build time as the Release configuration.
MasterWithLTCGUse MasterWithLTCG for game submission and final testing. This configuration:
- Enables link time code generation for generated C++ code, IL2CPP runtime, and IL2CPP garbage collection.
- Results in much longer build times compared to the Master configuration.
- Results in an application that executes faster than the Master configuration.