Show / Hide Table of Contents

Class Application

Inheritance
Object
Application
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine
Assembly: UnityEngine.dll
Syntax
public class Application

Properties

absoluteURL

Declaration
public static string absoluteURL { get; }
Property Value
Type Description
String

backgroundLoadingPriority

Declaration
public static ThreadPriority backgroundLoadingPriority { get; set; }
Property Value
Type Description
ThreadPriority

buildGUID

Declaration
public static string buildGUID { get; }
Property Value
Type Description
String

cloudProjectId

Declaration
public static string cloudProjectId { get; }
Property Value
Type Description
String

companyName

Declaration
public static string companyName { get; }
Property Value
Type Description
String

consoleLogPath

Declaration
public static string consoleLogPath { get; }
Property Value
Type Description
String

dataPath

Declaration
public static string dataPath { get; }
Property Value
Type Description
String

genuine

Declaration
public static bool genuine { get; }
Property Value
Type Description
Boolean

genuineCheckAvailable

Declaration
public static bool genuineCheckAvailable { get; }
Property Value
Type Description
Boolean

identifier

Declaration
public static string identifier { get; }
Property Value
Type Description
String

installerName

Declaration
public static string installerName { get; }
Property Value
Type Description
String

installMode

Declaration
public static ApplicationInstallMode installMode { get; }
Property Value
Type Description
ApplicationInstallMode

internetReachability

Declaration
public static NetworkReachability internetReachability { get; }
Property Value
Type Description
NetworkReachability

isBatchMode

Declaration
public static bool isBatchMode { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

isConsolePlatform

Declaration
public static bool isConsolePlatform { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

isEditor

Declaration
public static bool isEditor { get; }
Property Value
Type Description
Boolean

isFocused

Declaration
public static bool isFocused { get; }
Property Value
Type Description
Boolean

isLoadingLevel

Declaration
[Obsolete("This property is deprecated, please use LoadLevelAsync to detect if a specific scene is currently loading.")]
public static bool isLoadingLevel { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

isMobilePlatform

Declaration
public static bool isMobilePlatform { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

isPlayer

Declaration
[Obsolete("use Application.isEditor instead")]
public static bool isPlayer { get; }
Property Value
Type Description
Boolean

isPlaying

Declaration
public static bool isPlaying { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

isShowingSplashScreen

Declaration
[Obsolete("This property is deprecated, please use SplashScreen.isFinished instead")]
public static bool isShowingSplashScreen { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

levelCount

Declaration
[Obsolete("Use SceneManager.sceneCountInBuildSettings")]
public static int levelCount { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

loadedLevel

Declaration
[Obsolete("Use SceneManager to determine what scenes have been loaded")]
public static int loadedLevel { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

loadedLevelName

Declaration
[Obsolete("Use SceneManager to determine what scenes have been loaded")]
public static string loadedLevelName { get; }
Property Value
Type Description
String

persistentDataPath

Declaration
[SecurityCritical]
public static string persistentDataPath { get; }
Property Value
Type Description
String

platform

Declaration
public static RuntimePlatform platform { get; }
Property Value
Type Description
RuntimePlatform

productName

Declaration
public static string productName { get; }
Property Value
Type Description
String

runInBackground

Declaration
public static bool runInBackground { get; set; }
Property Value
Type Description
Boolean

sandboxType

Declaration
public static ApplicationSandboxType sandboxType { get; }
Property Value
Type Description
ApplicationSandboxType

stackTraceLogType

Declaration
[Obsolete("Use SetStackTraceLogType/GetStackTraceLogType instead")]
public static StackTraceLogType stackTraceLogType { get; set; }
Property Value
Type Description
StackTraceLogType
| Improve this Doc View Source

streamedBytes

Declaration
[Obsolete("Streaming was a Unity Web Player feature, and is removed. This property is deprecated and always returns 0.")]
public static int streamedBytes { get; }
Property Value
Type Description
Int32

streamingAssetsPath

Declaration
public static string streamingAssetsPath { get; }
Property Value
Type Description
String

systemLanguage

Declaration
public static SystemLanguage systemLanguage { get; }
Property Value
Type Description
SystemLanguage

targetFrameRate

Declaration
public static int targetFrameRate { get; set; }
Property Value
Type Description
Int32

temporaryCachePath

Declaration
public static string temporaryCachePath { get; }
Property Value
Type Description
String

unityVersion

Declaration
public static string unityVersion { get; }
Property Value
Type Description
String

version

Declaration
public static string version { get; }
Property Value
Type Description
String

Methods

CancelQuit()

Declaration
[Obsolete("CancelQuit is deprecated. Use the wantsToQuit event instead.")]
public static void CancelQuit()
| Improve this Doc View Source

CanStreamedLevelBeLoaded(Int32)

Declaration
public static bool CanStreamedLevelBeLoaded(int levelIndex)
Parameters
Type Name Description
Int32 levelIndex
Returns
Type Description
Boolean

CanStreamedLevelBeLoaded(String)

Declaration
public static bool CanStreamedLevelBeLoaded(string levelName)
Parameters
Type Name Description
String levelName
Returns
Type Description
Boolean
| Improve this Doc View Source

CaptureScreenshot(String)

Declaration
[Obsolete("Application.CaptureScreenshot is obsolete. Use ScreenCapture.CaptureScreenshot instead (UnityUpgradable) -> [UnityEngine] UnityEngine.ScreenCapture.CaptureScreenshot(*)", true)]
public static void CaptureScreenshot(string filename)
Parameters
Type Name Description
String filename
| Improve this Doc View Source

CaptureScreenshot(String, Int32)

Declaration
[Obsolete("Application.CaptureScreenshot is obsolete. Use ScreenCapture.CaptureScreenshot instead (UnityUpgradable) -> [UnityEngine] UnityEngine.ScreenCapture.CaptureScreenshot(*)", true)]
public static void CaptureScreenshot(string filename, int superSize)
Parameters
Type Name Description
String filename
Int32 superSize
| Improve this Doc View Source

DontDestroyOnLoad(Object)

Declaration
[Obsolete("Use Object.DontDestroyOnLoad instead")]
public static void DontDestroyOnLoad(Object o)
Parameters
Type Name Description
Object o
| Improve this Doc View Source

ExternalCall(String, Object[])

Declaration
[Obsolete("Application.ExternalCall is deprecated. See https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html for alternatives.")]
public static void ExternalCall(string functionName, params object[] args)
Parameters
Type Name Description
String functionName
Object[] args
| Improve this Doc View Source

ExternalEval(String)

Declaration
[Obsolete("Application.ExternalEval is deprecated. See https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html for alternatives.")]
public static void ExternalEval(string script)
Parameters
Type Name Description
String script
| Improve this Doc View Source

ForceCrash(Int32)

Declaration
[Obsolete("Use UnityEngine.Diagnostics.Utils.ForceCrash")]
public static void ForceCrash(int mode)
Parameters
Type Name Description
Int32 mode

GetBuildTags()

Declaration
public static string[] GetBuildTags()
Returns
Type Description
String[]

GetStackTraceLogType(LogType)

Declaration
public static StackTraceLogType GetStackTraceLogType(LogType logType)
Parameters
Type Name Description
LogType logType
Returns
Type Description
StackTraceLogType
| Improve this Doc View Source

GetStreamProgressForLevel(Int32)

Declaration
[Obsolete("Streaming was a Unity Web Player feature, and is removed. This function is deprecated and always returns 1.0 for valid level indices.")]
public static float GetStreamProgressForLevel(int levelIndex)
Parameters
Type Name Description
Int32 levelIndex
Returns
Type Description
Single
| Improve this Doc View Source

GetStreamProgressForLevel(String)

Declaration
[Obsolete("Streaming was a Unity Web Player feature, and is removed. This function is deprecated and always returns 1.0.")]
public static float GetStreamProgressForLevel(string levelName)
Parameters
Type Name Description
String levelName
Returns
Type Description
Single

HasProLicense()

Declaration
public static bool HasProLicense()
Returns
Type Description
Boolean

HasUserAuthorization(UserAuthorization)

Declaration
public static bool HasUserAuthorization(UserAuthorization mode)
Parameters
Type Name Description
UserAuthorization mode
Returns
Type Description
Boolean

IsPlaying(Object)

Declaration
public static bool IsPlaying(Object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
| Improve this Doc View Source

LoadLevel(Int32)

Declaration
[Obsolete("Use SceneManager.LoadScene")]
public static void LoadLevel(int index)
Parameters
Type Name Description
Int32 index
| Improve this Doc View Source

LoadLevel(String)

Declaration
[Obsolete("Use SceneManager.LoadScene")]
public static void LoadLevel(string name)
Parameters
Type Name Description
String name
| Improve this Doc View Source

LoadLevelAdditive(Int32)

Declaration
[Obsolete("Use SceneManager.LoadScene")]
public static void LoadLevelAdditive(int index)
Parameters
Type Name Description
Int32 index
| Improve this Doc View Source

LoadLevelAdditive(String)

Declaration
[Obsolete("Use SceneManager.LoadScene")]
public static void LoadLevelAdditive(string name)
Parameters
Type Name Description
String name
| Improve this Doc View Source

LoadLevelAdditiveAsync(Int32)

Declaration
[Obsolete("Use SceneManager.LoadSceneAsync")]
public static AsyncOperation LoadLevelAdditiveAsync(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
AsyncOperation
| Improve this Doc View Source

LoadLevelAdditiveAsync(String)

Declaration
[Obsolete("Use SceneManager.LoadSceneAsync")]
public static AsyncOperation LoadLevelAdditiveAsync(string levelName)
Parameters
Type Name Description
String levelName
Returns
Type Description
AsyncOperation
| Improve this Doc View Source

LoadLevelAsync(Int32)

Declaration
[Obsolete("Use SceneManager.LoadSceneAsync")]
public static AsyncOperation LoadLevelAsync(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
AsyncOperation
| Improve this Doc View Source

LoadLevelAsync(String)

Declaration
[Obsolete("Use SceneManager.LoadSceneAsync")]
public static AsyncOperation LoadLevelAsync(string levelName)
Parameters
Type Name Description
String levelName
Returns
Type Description
AsyncOperation

OpenURL(String)

Declaration
public static void OpenURL(string url)
Parameters
Type Name Description
String url
| Improve this Doc View Source

Quit()

Declaration
public static void Quit()

Quit(Int32)

Declaration
public static void Quit(int exitCode)
Parameters
Type Name Description
Int32 exitCode
| Improve this Doc View Source

RegisterLogCallback(Application.LogCallback)

Declaration
[Obsolete("Application.RegisterLogCallback is deprecated. Use Application.logMessageReceived instead.")]
public static void RegisterLogCallback(Application.LogCallback handler)
Parameters
Type Name Description
Application.LogCallback handler
| Improve this Doc View Source

RegisterLogCallbackThreaded(Application.LogCallback)

Declaration
[Obsolete("Application.RegisterLogCallbackThreaded is deprecated. Use Application.logMessageReceivedThreaded instead.")]
public static void RegisterLogCallbackThreaded(Application.LogCallback handler)
Parameters
Type Name Description
Application.LogCallback handler

RequestAdvertisingIdentifierAsync(Application.AdvertisingIdentifierCallback)

Declaration
public static bool RequestAdvertisingIdentifierAsync(Application.AdvertisingIdentifierCallback delegateMethod)
Parameters
Type Name Description
Application.AdvertisingIdentifierCallback delegateMethod
Returns
Type Description
Boolean

RequestUserAuthorization(UserAuthorization)

Declaration
public static AsyncOperation RequestUserAuthorization(UserAuthorization mode)
Parameters
Type Name Description
UserAuthorization mode
Returns
Type Description
AsyncOperation

SetBuildTags(String[])

Declaration
public static void SetBuildTags(string[] buildTags)
Parameters
Type Name Description
String[] buildTags

SetStackTraceLogType(LogType, StackTraceLogType)

Declaration
public static void SetStackTraceLogType(LogType logType, StackTraceLogType stackTraceType)
Parameters
Type Name Description
LogType logType
StackTraceLogType stackTraceType

Unload()

Declaration
public static void Unload()
| Improve this Doc View Source

UnloadLevel(Int32)

Declaration
[Obsolete("Use SceneManager.UnloadScene")]
public static bool UnloadLevel(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
Boolean
| Improve this Doc View Source

UnloadLevel(String)

Declaration
[Obsolete("Use SceneManager.UnloadScene")]
public static bool UnloadLevel(string scenePath)
Parameters
Type Name Description
String scenePath
Returns
Type Description
Boolean

Events

| Improve this Doc View Source

logMessageReceived

Declaration
public static event Application.LogCallback logMessageReceived
Event Type
Type Description
Application.LogCallback
| Improve this Doc View Source

logMessageReceivedThreaded

Declaration
public static event Application.LogCallback logMessageReceivedThreaded
Event Type
Type Description
Application.LogCallback
| Improve this Doc View Source

lowMemory

Declaration
public static event Application.LowMemoryCallback lowMemory
Event Type
Type Description
Application.LowMemoryCallback
| Improve this Doc View Source

onBeforeRender

Declaration
public static event UnityAction onBeforeRender
Event Type
Type Description
UnityAction
| Improve this Doc View Source

quitting

Declaration
public static event Action quitting
Event Type
Type Description
Action
| Improve this Doc View Source

wantsToQuit

Declaration
public static event Func<bool> wantsToQuit
Event Type
Type Description
Func<Boolean>

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX