PlayerSettings Manual     Reference     Scripting  
Scripting > Editor Classes > PlayerSettings
PlayerSettings Inherits from UnityEngine.Object

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.

Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.

Class Variables
companyName

The name of your company.

productName

The name of your product.

defaultScreenWidth

Default horizontal dimension of stand-alone player window.

defaultScreenHeight

Default vertical dimension of stand-alone player window.

defaultWebScreenWidth

Default horizontal dimension of web player window.

defaultWebScreenHeight

Default vertical dimension of web player window.

displayResolutionDialog

Defines the behaviour of the Resolution Dialog on product launch.

defaultIsFullScreen

If enabled, the game will default to fullscreen mode.

useAlphaInDashboard

Enables OSX Dashboard widgets with transparent backgrounds.

runInBackground

If enabled, your game will continue to run after lost focus.

captureSingleScreen

Defines if fullscreen games should darken secondary displays.

usePlayerLog

Write a log file with debugging information.

alwaysDisplayWatermark

Defines if the Unity watermark should be constantly displayed.

firstStreamedLevelWithResources

First level to have access to all Resources.Load assets in Streamed Web Players.

resolutionDialogBanner

The image to display in the Resolution Dialog window.

iPhoneBundleIdentifier

The bundle identifier of the iPhone application.

keystorePass

Password used for interacting with the Android Keystore.

keyaliasPass

Password for the key used for signing an Android application.

xboxTitleId

Xbox 360 title id

xboxImageXexFilePath

Xbox 360 ImageXex override configuration file path

xboxSpaFilePath

Xbox 360 SPA file path

xboxGenerateSpa

Xbox 360 _SPAConfig.cs auto-generation

bundleIdentifier

Application bundle identifier shared between iOS & Android platforms

bundleVersion

Application bundle version shared between iOS & Android platforms

strippingLevel

Managed code stripping level

defaultInterfaceOrientation

Default screen orientation for mobiles

apiCompatibilityLevel

.NET API compatibility level

advancedLicense

Class Functions
HasAspectRatio

Returns whether or not the specified aspect ratio is enabled.

SetAspectRatio

Enables the specified aspect ratio.