Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Visual Studio solution contents and configurations for Windows

Understand the contents and build configuration options of a generated Visual Studio solution for Windows.
Read time 2 minutesLast updated 12 days ago

Generate a Visual Studio solution to change your build process. For example, you can modify your application’s manifest, add C++ code, modify embedded resources, or launch your application with the debugger attached.
Depending on which scripting backend your Unity project uses, the generated solution includes a different number of projects: three for Mono and four for IL2CPP.

Solution contents

When you generate a Visual Studio Solution, Unity creates the following projects:

Project

Description

projectName (represents your project name)This is your main project. Visual Studio builds this project into the final application executable. You are most likely to make changes here.
UnityData
(stored inside the projectName project)
This project contains all the Unity-specific files you need to build your project, such as assets.
UnityPlayerStubThis is a stub library for
UnityPlayer.dll
. Unity uses this to link your executable to the
UnityPlayer.dll
and expose the available
UnityPlayer.dll
API.
Il2CppOutputProject (IL2CPP scripting backend only)This project contains:
  • The generated C++ code which Unity converts from managed assemblies.
  • The source code for IL2CPP runtime.
  • The IL2CPP garbage collector.
You can debug this code from inside Visual Studio.

Build configuration options in Visual Studio

Visual Studio provides a variety of build configuration options. All optimization and debug references in this section refer to the Visual Studio solution only. To select your options, click on Release and choose from the drop-down menu.

Configuration

Use

Description

DebugUse the Debug configuration when debugging C++ code.
  • Disables all optimization.
  • Preserves all debugging information in the code.
  • Results in code that runs slowly.
ReleaseUse the Release configuration to profile your game.
  • Enables code optimizations.
MasterUse the Master configuration for game submission and final testing.
  • Disables the profiler.
  • Results in the same build time as the Release configuration.
MasterWithLTCG (IL2CPP only)Use for game submission and final testing with IL2CPP.
  • 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.
  • Resulting application executes faster.

Additional resources