Version: 2017.4
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

PlayerSettings

class in UnityEditor

/

Inherits from:Object

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual

Description

Player Settings is where you define various parameters for the final game that you will build in Unity. Some of these values are used in the Resolution Dialog that launches when you open a standalone game.

Static Properties

accelerometerFrequencyAccelerometer update frequency.
actionOnDotNetUnhandledExceptionSets the crash behavior on .NET unhandled exception.
advancedLicenseIs the advanced version being used?
allowedAutorotateToLandscapeLeftIs auto-rotation to landscape left supported?
allowedAutorotateToLandscapeRightIs auto-rotation to landscape right supported?
allowedAutorotateToPortraitIs auto-rotation to portrait supported?
allowedAutorotateToPortraitUpsideDownIs auto-rotation to portrait upside-down supported?
allowFullscreenSwitchIf enabled, allows the user to switch between full screen and windowed mode using OS specific keyboard short cuts.
aotOptionsAdditional AOT compilation options. Shared by AOT platforms.
applicationIdentifierThe application identifier for the currently selected build target.
bakeCollisionMeshesPre bake collision meshes on player build.
bundleVersionApplication bundle version shared between iOS & Android platforms.
captureSingleScreenDefines if fullscreen games should darken secondary displays.
cloudProjectIdA unique cloud project identifier. It is unique for every project (Read Only).
colorSpaceSet the rendering color space for the current project.
companyNameThe name of your company.
cursorHotspotDefault cursor's click position in pixels from the top left corner of the cursor image.
d3d11FullscreenModeDefine how to handle fullscreen mode in Windows standalones (Direct3D 11 mode).
defaultCursorThe default cursor for your application.
defaultInterfaceOrientationDefault screen orientation for mobiles.
defaultIsFullScreenIf enabled, the game will default to fullscreen mode.
defaultScreenHeightDefault vertical dimension of stand-alone player window.
defaultScreenWidthDefault horizontal dimension of stand-alone player window.
defaultWebScreenHeightDefault vertical dimension of web player window.
defaultWebScreenWidthDefault horizontal dimension of web player window.
displayResolutionDialogDefines the behaviour of the Resolution Dialog on product launch.
enableCrashReportAPIEnables CrashReport API.
enableInternalProfilerEnables internal profiler.
forceSingleInstanceRestrict standalone players to a single concurrent running instance.
gpuSkinningEnable GPU skinning on capable platforms.
graphicsJobModeSelects the graphics job mode to use on platforms that support both Native and Legacy graphics jobs.
graphicsJobsEnable graphics jobs (multi threaded rendering).
keyaliasPassPassword for the key used for signing an Android application.
keystorePassPassword used for interacting with the Android Keystore.
logObjCUncaughtExceptionsAre ObjC uncaught exceptions logged?
macFullscreenModeDefine how to handle fullscreen mode in macOS standalones.
macRetinaSupportEnable Retina support for macOS.
MTRenderingIs multi-threaded rendering enabled?
muteOtherAudioSourcesStops or allows audio from other applications to play in the background while your Unity application is running.
preserveFramebufferAlphaWhen enabled, preserves the alpha value in the framebuffer to support rendering over native UI on Android.
productNameThe name of your product.
protectGraphicsMemoryProtect graphics memory.
resizableWindowUse resizable window in standalone player builds.
resolutionDialogBannerThe image to display in the Resolution Dialog window.
runInBackgroundIf enabled, your game will continue to run after lost focus.
scriptingRuntimeVersionThe scripting runtime version setting. Change this to set the version the Editor uses and restart the Editor to apply the change.
statusBarHiddenReturns if status bar should be hidden. Supported on iOS only; on Android, the status bar is always hidden.
stereoRenderingPathActive stereo rendering path
stripEngineCodeRemove unused Engine code from your build (IL2CPP-only).
strippingLevelManaged code stripping level.
stripUnusedMeshComponentsShould unused Mesh components be excluded from game build?
use32BitDisplayBuffer32-bit Display Buffer is used.
useAnimatedAutorotationLet the OS autorotate the screen as the device orientation changes.
useHDRDisplaySwitch display to HDR mode (if available).
useMacAppStoreValidationEnable receipt validation for the Mac App Store.
usePlayerLogWrite a log file with debugging information.
virtualRealitySplashScreenVirtual Reality specific splash screen.
virtualRealitySupportedEnable Virtual Reality support on the current build target.
visibleInBackgroundOn Windows, show the application in the background if Fullscreen Windowed mode is used.
xboxEnableAvatarXbox 360 Avatars.

Static Methods

GetAdditionalIl2CppArgsIL2CPP build arguments.
GetApiCompatibilityLevelGets .NET API compatibility level for specified BuildTargetGroup.
GetApplicationIdentifierGet the application identifier for the specified platform.
GetArchitectureGets the BuildTargetPlatformGroup architecture.
GetAvailableVirtualRealitySDKsReturns a list of the available Virtual Reality SDKs that are supported on a given BuildTargetGroup.
GetGraphicsAPIsGet graphics APIs to be used on a build platform.
GetIconsForTargetGroupReturns the list of assigned icons for the specified platform.
GetIconSizesForTargetGroupReturns a list of icon sizes for the specified platform.
GetIncrementalIl2CppBuildDoes IL2CPP platform use incremental build?
GetMobileMTRenderingCheck if multithreaded rendering option for mobile platform is enabled.
GetPlatformVuforiaEnabledGets the current value of the Vuforia AR checkbox in the Player Settings for the specified buildTargetGroup.
GetScriptingBackendGets the scripting framework for a BuildTargetPlatformGroup.
GetScriptingDefineSymbolsForGroupGet user-specified symbols for script compilation for the given build target group.
GetStackTraceLogTypeGet stack trace logging options.
GetUseDefaultGraphicsAPIsIs a build platform using automatic graphics API choice?
GetVirtualRealitySDKsGet the List of Virtual Reality SDKs for a given BuildTargetGroup.
GetVirtualRealitySupportedReturns whether or not Virtual Reality Support is enabled for a given BuildTargetGroup.
HasAspectRatioReturns whether or not the specified aspect ratio is enabled.
SetAdditionalIl2CppArgsIL2CPP build arguments.
SetApiCompatibilityLevelSets .NET API compatibility level for specified BuildTargetGroup.
SetApplicationIdentifierSet the application identifier for the specified platform.
SetArchitectureSets the BuildTargetPlatformGroup architecture.
SetAspectRatioEnables the specified aspect ratio.
SetGraphicsAPIsSets the graphics APIs used on a build platform.
SetIconsForTargetGroupAssign a list of icons for the specified platform.
SetIncrementalIl2CppBuildSets incremental build flag.
SetMobileMTRenderingEnable or disable multithreaded rendering option for mobile platform.
SetPlatformVuforiaEnabledSets the value of the Vuforia AR checkbox in the Player Settings for the specified buildTargetGroup.
SetScriptingBackendSets the scripting framework for a BuildTargetPlatformGroup.
SetScriptingDefineSymbolsForGroupSet user-specified symbols for script compilation for the given build target group.
SetStackTraceLogTypeSet stack trace logging options. Note: calling this function will implicitly call Application.SetStackTraceLogType.
SetUseDefaultGraphicsAPIsShould a build platform use automatic graphics API choice.
SetVirtualRealitySDKsSet the List of Virtual Reality SDKs for a given BuildTargetGroup.
SetVirtualRealitySupportedSets whether or not Virtual Reality Support is enabled for a given BuildTargetGroup.

Inherited Members

Properties

hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
nameThe name of the object.

Public Methods

GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the GameObject.

Static Methods

DestroyRemoves a gameobject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
InstantiateClones the object original and returns the clone.

Operators

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.