# BuildOptions

> Options to configure a build. You can combine multiple build options together.

## Definition

* **Type:** Enum
* **Namespace:** [UnityEditor](/engine/6000.5/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
[Flags]
public enum BuildOptions
```

## Remarks

Additional Resources: [BuildPipeline.BuildPlayer](/engine/6000.5/script-reference/unityeditor/buildpipeline/buildplayer.md)

## Examples

```csharp
using UnityEditor;
using UnityEngine;

namespace BuildDocExamples
{
    public class BuildOptions_EditorExamples : MonoBehaviour
    {
        [MenuItem("BuildDocExamples/Build/Development and strict mode build")]
        public static void DevStrictModeBuild()
        {
            BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();
            buildPlayerOptions.scenes = new[] { "Assets/scene.unity" };
            buildPlayerOptions.locationPathName = "scriptBuilds";
            buildPlayerOptions.target = BuildTarget.StandaloneOSX;

            // use these options for a development and strict mode build
            buildPlayerOptions.options = BuildOptions.Development | BuildOptions.StrictMode;

            BuildPipeline.BuildPlayer(buildPlayerOptions);
        }

        [MenuItem("BuildDocExamples/Build/Scripts only build")]
        public static void ScriptsOnlyBuild()
        {
            BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();
            buildPlayerOptions.scenes = new[] { "Assets/scene.unity" };
            buildPlayerOptions.locationPathName = "scriptBuilds";
            buildPlayerOptions.target = BuildTarget.StandaloneOSX;

            // use these options for building scripts
            buildPlayerOptions.options = BuildOptions.BuildScriptsOnly | BuildOptions.Development;

            BuildPipeline.BuildPlayer(buildPlayerOptions);
        }

        [MenuItem("BuildDocExamples/Build/DetailedBuildReport build")]
        public static void DetailedBuildReportExample()
        {
            BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();
            buildPlayerOptions.scenes = new[] { "Assets/scene.unity" };
            buildPlayerOptions.locationPathName = "DetailedReportBuild/MyGame.exe";
            buildPlayerOptions.target = BuildTarget.StandaloneWindows64;

            buildPlayerOptions.options = BuildOptions.DetailedBuildReport;

            var buildReport = BuildPipeline.BuildPlayer(buildPlayerOptions);
        }
    }
}
```

## Fields

| Value                                                                                                                                  | Description                                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AcceptExternalModificationsToPlayer](/engine/6000.5/script-reference/unityeditor/buildoptions/acceptexternalmodificationstoplayer.md) | Appends to an existing Xcode (iOS) project during the build process.                                                                                                                                     |
| [AllowDebugging](/engine/6000.5/script-reference/unityeditor/buildoptions/allowdebugging.md)                                           | Allow script debuggers to attach to the Player remotely. You can debug your scripts only if you use [BuildOptions.Development](/engine/6000.5/script-reference/unityeditor/buildoptions/development.md). |
| [AutoRunPlayer](/engine/6000.5/script-reference/unityeditor/buildoptions/autorunplayer.md)                                             | Run the built Player.                                                                                                                                                                                    |
| [BuildAdditionalStreamedScenes](/engine/6000.5/script-reference/unityeditor/buildoptions/buildadditionalstreamedscenes.md)             | For internal use                                                                                                                                                                                         |
| [BuildScriptsOnly](/engine/6000.5/script-reference/unityeditor/buildoptions/buildscriptsonly.md)                                       | Only build the scripts in a project.                                                                                                                                                                     |
| [CleanBuildCache](/engine/6000.5/script-reference/unityeditor/buildoptions/cleanbuildcache.md)                                         | Clear all cached build results, resulting in a full rebuild of all scripts and all player data.                                                                                                          |
| [CompressWithLz4](/engine/6000.5/script-reference/unityeditor/buildoptions/compresswithlz4.md)                                         | Use chunk-based LZ4 compression when building the Player.                                                                                                                                                |
| [CompressWithLz4HC](/engine/6000.5/script-reference/unityeditor/buildoptions/compresswithlz4hc.md)                                     | Use chunk-based LZ4 high-compression when building the Player.                                                                                                                                           |
| [ConnectToHost](/engine/6000.5/script-reference/unityeditor/buildoptions/connecttohost.md)                                             | Sets the Player to connect to the Editor.                                                                                                                                                                |
| [ConnectWithProfiler](/engine/6000.5/script-reference/unityeditor/buildoptions/connectwithprofiler.md)                                 | Start the Player with a connection to the Profiler in the Editor.                                                                                                                                        |
| [CustomConnectionID](/engine/6000.5/script-reference/unityeditor/buildoptions/customconnectionid.md)                                   | Determines if the player should be using the custom connection ID.                                                                                                                                       |
| [DetailedBuildReport](/engine/6000.5/script-reference/unityeditor/buildoptions/detailedbuildreport.md)                                 | Generates detailed information in the [BuildReport](/engine/6000.5/script-reference/unityeditor/build/reporting/buildreport.md).                                                                         |
| [Development](/engine/6000.5/script-reference/unityeditor/buildoptions/development.md)                                                 | Build a development version of the Player.                                                                                                                                                               |
| [EnableCodeCoverage](/engine/6000.5/script-reference/unityeditor/buildoptions/enablecodecoverage.md)                                   | Enables code coverage. You can use this as a complimentary way of enabling code coverage on platforms that do not support command line arguments.                                                        |
| [EnableDeepProfilingSupport](/engine/6000.5/script-reference/unityeditor/buildoptions/enabledeepprofilingsupport.md)                   | Enables Deep Profiling support in the Player.                                                                                                                                                            |
| [ForceEnableAssertions](/engine/6000.5/script-reference/unityeditor/buildoptions/forceenableassertions.md)                             | Include assertions in the build. By default, the assertions are only included in development builds.                                                                                                     |
| [IncludeTestAssemblies](/engine/6000.5/script-reference/unityeditor/buildoptions/includetestassemblies.md)                             | Build will include Assemblies for testing.                                                                                                                                                               |
| [None](/engine/6000.5/script-reference/unityeditor/buildoptions/none.md)                                                               | Perform the specified build without any special settings or extra tasks.                                                                                                                                 |
| [NoUniqueIdentifier](/engine/6000.5/script-reference/unityeditor/buildoptions/nouniqueidentifier.md)                                   | Will force the buildGUID to all zeros.                                                                                                                                                                   |
| [PatchPackage](/engine/6000.5/script-reference/unityeditor/buildoptions/patchpackage.md)                                               | Patch a  app package rather than completely rebuilding it.                                                                                                                                               |
| [ShowBuiltPlayer](/engine/6000.5/script-reference/unityeditor/buildoptions/showbuiltplayer.md)                                         | Show the built Player.                                                                                                                                                                                   |
| [StrictMode](/engine/6000.5/script-reference/unityeditor/buildoptions/strictmode.md)                                                   | Prevent the build from succeeding if any errors are reported during the build process.                                                                                                                   |
| [SymlinkSources](/engine/6000.5/script-reference/unityeditor/buildoptions/symlinksources.md)                                           | Symlink sources when generating the project. This is useful if you're changing source files inside the generated project and want to bring the changes back into your Unity project or a package.        |
| [UncompressedAssetBundle](/engine/6000.5/script-reference/unityeditor/buildoptions/uncompressedassetbundle.md)                         | Don't compress the data when creating the asset bundle.                                                                                                                                                  |
| [WaitForPlayerConnection](/engine/6000.5/script-reference/unityeditor/buildoptions/waitforplayerconnection.md)                         | Sets the Player to wait for player connection on player start.                                                                                                                                           |
