Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


EditorUserBuildSettings

User build settings for the Editor
Read time 7 minutesLast updated 4 days ago

Definition

  • Type: Class
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
  • Inherits from: Object
public class EditorUserBuildSettings : Object

Remarks

EditorUserBuildSettings tracks the build configuration for Player or AssetBundles builds. For example, the active build target is used to determine which platform the Player is built for.
This class is used to store build-related settings that are local to the project, as installed on a specific device. For example, EditorUserBuildSettings.activeBuildTarget is a setting that could have different values for different people who are using the same Unity project and simultaneously building the Player for different devices.
EditorUserBuildSettings is stored in
Library/EditorUserBuildSettings.asset
, a location which is not intended for inclusion in version control. Some of these settings can be overridden by the active BuildProfile, see Override settings with build profiles for details.
When writing a custom build script it is possible to retrieve the current settings using this class, or to provide different settings, see BuildPlayerOptions and BuildAssetBundlesParameters.
The related class EditorBuildSettings exposes build-related settings that are suitable to be backed up and shared through version control.

Static Properties

Property

Description

activeBuildTargetThe currently active build target.
activeScriptCompilationDefinesDEFINE directives for the compiler.
allowDebuggingEnable source-level debuggers to connect.
androidBuildSubtargetAndroid platform options.
buildAppBundleSet to true to build an Android App Bundle (aab file) instead of an apk. The default value is false.
buildScriptsOnlyIs build script only enabled.
buildWithCodeCoverageEnables Code Coverage in the Player.
buildWithDeepProfilingSupportEnables Deep Profiling support in the Player.
compressFilesInPackageCompress files in package.
connectProfilerStart the player with a connection to the profiler.
developmentEnables a development build.
explicitArrayBoundsChecksWhen true, array bounds are actively validated in code generated by IL2CPP. When false, they are not.
explicitDivideByZeroChecksWhen true, divisions by zero are actively validated in code generated by IL2CPP. When false, they are not.
explicitNullChecksWhen true, null references are actively validated in C++ generated by IL2CPP. When false, they are not.
exportAsGoogleAndroidProjectExport Android Project for use with Android Studio/Gradle.
forceInstallationForce installation of package, even if error.
installInBuildFolderPlace the built player in the build folder.
iOSXcodeBuildConfigThe scheme Xcode uses to run this project.
macOSXcodeBuildConfigThe scheme Xcode uses to run this project.
managedDebuggerFixedPortForce the port used by the managed debugger. Default is 0 which means platform-specific auto-selection of a port.
movePackageToDiscOuterEdgePlaces the package on the outer edge of the disk.
needSubmissionMaterialsBuild submission materials.
overrideMaxTextureSizeThe override for the maximum texture size when importing assets.
overrideTextureCompressionThe asset importing override of texture compression.
ps4BuildSubtargetPS4 Build Subtarget.
ps4HardwareTargetSpecifies which version of PS4 hardware to target.
selectedBuildTargetGroupThe currently selected build target group.
selectedStandaloneTargetThe currently selected target for a standalone build.
standaloneBuildSubtargetDesktop standalone build subtarget.
symlinkSourcesSymlink sources when generating the project.
waitForManagedDebuggerInstructs the Player to wait for managed debugger to attach before executing any script code.
waitForPlayerConnectionSets the Player to wait for player connection on player start.
webGLBuildSubtargetWebGL Build subtarget.
webGLClientBrowserPathThe path to the executable of the browser in which to load the web application.
webGLClientBrowserTypeDefines the client browser type in which to load the web application.
windowsBuildAndRunDeployTargetSets and gets the Windows device to launch the Windows app when using Build and Run.
windowsDevicePortalAddressSpecifies the Windows DevicePortal connection address of the device to deploy and launch the UWP app on when using Build and Run.
windowsDevicePortalPasswordSpecifies the Windows DevicePortal password for the device to deploy and launch the UWP app on when using Build and Run.
windowsDevicePortalUsernameSpecifies the Windows DevicePortal username for the device to deploy and launch the UWP app on when using Build and Run.
wsaBuildAndRunDeployTargetSets and gets the Windows device to launch the UWP app when using Build and Run.
wsaUWPBuildTypeThe build type for the Universal Windows Platform.
wsaUWPSDKSets and gets target UWP SDK to build Windows Store application against.
wsaUWPVisualStudioVersionSets and gets Visual Studio version to build Windows Store application with.

Static Methods

Method

Description

GetBuildLocationReturns the location used for the last saved build.
GetPlatformSettingsReturns value for platform-specific Editor setting.
SetBuildLocationSet a new location for the build.
SetPlatformSettingsSet platform specifc Editor setting.
SwitchActiveBuildTargetSelect a new build target to be active.
SwitchActiveBuildTargetAsyncSelect a new build target to be active during the next Editor update.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.