Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Windows build settings reference

Configure and build your application for Windows.
Read time 5 minutesLast updated 18 days ago

Use these settings to configure how Unity builds your application for Windows platform. You can update your Windows build settings from the Build Profiles window.

Property

Description

Architecture
Select the CPU to build for (only applies to Build And Run).
  • Intel 64-bit: Use Intel/AMD 64-bit CPU architecture.
  • Intel 32-bit: Use 32-bit Intel CPU architecture.
  • ARM 64-bit: Use 64-bit ARM CPU architecture.
Build and Run on
Select the target device or transport to deploy and launch the app during Build And Run.
  • Local Machine: Deploys and launches the app on the local PC.
  • Remote Device (via Device Portal): Deploys and launches the app to a connected device over the Device Portal transport.
  • Xbox PC Remote Tools: Deploys and launches the app to a connected device using the Xbox PC Remote Tools. Enter the IP address or device name of the connected device paired via Xbox PC Toolbox in the Xbox PC Toolbox Device property.
    Note: If the installation status displays Xbox PC Toolbox: Not installed, select Get to install it and pair the development and target devices. If already installed, the Get button changes to Launch, allowing you to open the app directly. For more information, refer to Deploy a Windows application with the Xbox PC Remote Tools.
Copy PDB files
Enable this setting to include Microsoft program database (PDB) files in the built Player. PDB files contain debugging information for your application, but might increase the size of your Player.
Create Visual Studio Solution
Enable this setting to generate Visual Studio Solution files for your Project, so you can build your final executable in Visual Studio.
Development Build
Builds the Player in development mode, which by default includes the Profiler and assertions in your managed assemblies. To add additional diagnostic code paths and data to the build, such as safety checks and debug symbols, configure the appropriate managed code variant for your build. Use this setting when you want to test your application. Selecting a development build defines the
DEVELOPMENT_BUILD
scripting symbol for your managed code. However, this symbol is marked for deprecation and it's recommended you replace usages of it with the symbols associated with the relevant managed code variant instead.
For more information, refer to Adding diagnostics to C# code.
Autoconnect Profiler
Automatically connect the Unity Profiler to your build. For more information, refer to Profiler.
Note: This option is available only if you select Development Build.
Deep Profiling
Allow the Profiler to process all your script code and record every function call, returning detailed profiling data. For more information, refer to Deep Profiling.
This property is available only if you enable Development Build.
Note: Enabling Deep Profiling might slow down script execution.
Code Coverage Support
Allow the Code Coverage feature to process all your script code and record every function call, returning detailed code coverage data. For more information, refer to the Coverage class description.
Note: This option is available only with the Mono scripting backend, if you select Development Build. This feature is currently disabled for Intel 32-bit targets and will be restored in a future update.
Script Debugging
Includes debug symbols in managed assemblies, generates unoptimized code, and defines the
DEBUG
scripting symbol. This is functionally equivalent to setting the Managed Code Variant Player setting to Debug (Edit > Project Settings > Player > Other Settings). For more information, refer to Adding diagnostics to C# code.
This property is available only if you enable Development Build.
Wait for Managed Debugger
Make the Player wait for a debugger to be attached before it executes any script code.
This property is visible only if you enable Script Debugging.
Compression Method
Specifies the method Unity uses to compress the data in your Project when it builds the Player. This includes Assets, Scenes, Player settings, and GI data.
  • Default: On Windows, Mac, Linux Standalone, and iOS, there's no default compression. On Android, the default compression is ZIP, which gives slightly better compression results than LZ4HC. However, ZIP data is slower to decompress.
  • LZ4HC: A high compression variant of LZ4 that is slower to build but produces better results for release builds. For more information, refer to BuildOptions.CompressWithLz4HC.

Windows Player build binaries

When you build a Unity title on the Windows platform, Unity produces the following files, where
ProjectName
is the name of your application:
  • ProjectName.exe
    - The project executable file, that's your project application. This contains the program entry point which calls into the Unity engine when launched. The path to the source code for
    ProjectName.exe
    is in the
    WindowsPlayer
    folder:
    Editor\Data\PlaybackEngines\WindowsStandaloneSupport\Source\WindowsPlayer
    .
  • UnityPlayer.dll
    - The DLL file that contains all the native Unity engine code. It's signed with the Unity Technologies certificate, which lets you verify that no malicious entities have tampered with your engine.
  • *.pdb files
    - Symbol files for debugging. Unity copies these to the build directory if you enable Copy PDB files in the Build Profiles window.
  • UnityClrProfiler.dll
    - The DLL file that enables Unity Profiler support for CoreCLR Players. It's also signed with the Unity Technologies certificate.
  • WinPixEventRuntime.dll
    - This DLL enables Introducing PIX on Windows (beta) support. Unity only creates this file if you enable the
    Development Build

    ?

    option in the Build Profiles window.
  • ProjectName_Data folder
    - This folder contains all the data needed to run your application.

Modify and rebuild your application

To modify your application or distribute the built code (for example, if you want to sign it or modify the built executable metadata), you must rebuild your project and place the output in your built game directory.
Modifying the built executable metadata, such as the publisher or company name is necessary to ensure that your application is correctly identified by the system. For example, various operating system tools and dialogs, such as Windows firewall use the executable metadata to display your application's information, such as the publisher or company name. The Unity Player executable included with the Unity installation is pre-built and might not reflect details specific your application. In this case, you can modify the executable metadata to include your application's information.
To modify the metadata, follow these steps:
  1. Enable the Create Visual Studio Solution setting to generate Visual Studio Solution files for your project and build your project in the Unity Editor.
  2. Open the build folder and locate a subfolder with the same name as your project. In the subfolder, find the
    WindowsPlayerVersion.rc
    file and open it with a text editor.
  3. Remove the lines of code that include conditional compilation directive
    #if defined(BUILDING_UNITY_PLAYER_DLL)
    and the corresponding
    #endif
    .
  4. Modify any metadata, such as
    CompanyName
    ,
    FileVersion
    ,
    FileDescription
    , or
    ProductName
    as required. For more information on these fields, refer to the documentation on StringFileInfo BLOCK Statement.
  5. Open the Visual Studio Solution from the build folder using Visual Studio and rebuild your project.
Note
To build your application outside of Unity, you need Visual Studio 2019 or 2022 with Desktop development with C++ workload installed.

Additional resources