Class Application
Assembly: UnityEngine.dll
Syntax
Properties
absoluteURL
Declaration
public static string absoluteURL { get; }
Property Value
backgroundLoadingPriority
Declaration
public static ThreadPriority backgroundLoadingPriority { get; set; }
Property Value
buildGUID
Declaration
public static string buildGUID { get; }
Property Value
cloudProjectId
Declaration
public static string cloudProjectId { get; }
Property Value
companyName
Declaration
public static string companyName { get; }
Property Value
consoleLogPath
Declaration
public static string consoleLogPath { get; }
Property Value
dataPath
Declaration
public static string dataPath { get; }
Property Value
genuine
Declaration
public static bool genuine { get; }
Property Value
genuineCheckAvailable
Declaration
public static bool genuineCheckAvailable { get; }
Property Value
identifier
Declaration
public static string identifier { get; }
Property Value
installerName
Declaration
public static string installerName { get; }
Property Value
installMode
Declaration
public static ApplicationInstallMode installMode { get; }
Property Value
internetReachability
Declaration
public static NetworkReachability internetReachability { get; }
Property Value
isBatchMode
Declaration
public static bool isBatchMode { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public static bool isConsolePlatform { get; }
Property Value
|
Improve this Doc
View Source
isEditor
Declaration
public static bool isEditor { get; }
Property Value
isFocused
Declaration
public static bool isFocused { get; }
Property Value
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
|
Improve this Doc
View Source
Declaration
public static bool isMobilePlatform { get; }
Property Value
|
Improve this Doc
View Source
isPlayer
Declaration
[Obsolete("use Application.isEditor instead")]
public static bool isPlayer { get; }
Property Value
isPlaying
Declaration
public static bool isPlaying { get; }
Property Value
|
Improve this Doc
View Source
isShowingSplashScreen
Declaration
[Obsolete("This property is deprecated, please use SplashScreen.isFinished instead")]
public static bool isShowingSplashScreen { get; }
Property Value
|
Improve this Doc
View Source
levelCount
Declaration
[Obsolete("Use SceneManager.sceneCountInBuildSettings")]
public static int levelCount { get; }
Property Value
|
Improve this Doc
View Source
loadedLevel
Declaration
[Obsolete("Use SceneManager to determine what scenes have been loaded")]
public static int loadedLevel { get; }
Property Value
|
Improve this Doc
View Source
loadedLevelName
Declaration
[Obsolete("Use SceneManager to determine what scenes have been loaded")]
public static string loadedLevelName { get; }
Property Value
persistentDataPath
Declaration
[SecurityCritical]
public static string persistentDataPath { get; }
Property Value
Declaration
public static RuntimePlatform platform { get; }
Property Value
productName
Declaration
public static string productName { get; }
Property Value
runInBackground
Declaration
public static bool runInBackground { get; set; }
Property Value
sandboxType
Declaration
public static ApplicationSandboxType sandboxType { get; }
Property Value
stackTraceLogType
Declaration
[Obsolete("Use SetStackTraceLogType/GetStackTraceLogType instead")]
public static StackTraceLogType stackTraceLogType { get; set; }
Property Value
|
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
streamingAssetsPath
Declaration
public static string streamingAssetsPath { get; }
Property Value
systemLanguage
Declaration
public static SystemLanguage systemLanguage { get; }
Property Value
targetFrameRate
Declaration
public static int targetFrameRate { get; set; }
Property Value
temporaryCachePath
Declaration
public static string temporaryCachePath { get; }
Property Value
unityVersion
Declaration
public static string unityVersion { get; }
Property Value
version
Declaration
public static string version { get; }
Property Value
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
CanStreamedLevelBeLoaded(String)
Declaration
public static bool CanStreamedLevelBeLoaded(string levelName)
Parameters
Type |
Name |
Description |
String |
levelName |
|
Returns
|
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
|
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
|
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 |
|
Declaration
public static string[] GetBuildTags()
Returns
GetStackTraceLogType(LogType)
Declaration
public static StackTraceLogType GetStackTraceLogType(LogType logType)
Parameters
Type |
Name |
Description |
LogType |
logType |
|
Returns
|
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
|
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
HasProLicense()
Declaration
public static bool HasProLicense()
Returns
HasUserAuthorization(UserAuthorization)
Declaration
public static bool HasUserAuthorization(UserAuthorization mode)
Parameters
Returns
IsPlaying(Object)
Declaration
public static bool IsPlaying(Object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
|
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
|
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
|
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
|
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
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
|
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
RequestAdvertisingIdentifierAsync(Application.AdvertisingIdentifierCallback)
Declaration
public static bool RequestAdvertisingIdentifierAsync(Application.AdvertisingIdentifierCallback delegateMethod)
Parameters
Returns
RequestUserAuthorization(UserAuthorization)
Declaration
public static AsyncOperation RequestUserAuthorization(UserAuthorization mode)
Parameters
Returns
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
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
|
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
Events
|
Improve this Doc
View Source
logMessageReceived
Declaration
public static event Application.LogCallback logMessageReceived
Event Type
|
Improve this Doc
View Source
logMessageReceivedThreaded
Declaration
public static event Application.LogCallback logMessageReceivedThreaded
Event Type
|
Improve this Doc
View Source
lowMemory
Declaration
public static event Application.LowMemoryCallback lowMemory
Event Type
|
Improve this Doc
View Source
onBeforeRender
Declaration
public static event UnityAction onBeforeRender
Event Type
|
Improve this Doc
View Source
quitting
Declaration
public static event Action quitting
Event Type
|
Improve this Doc
View Source
wantsToQuit
Declaration
public static event Func<bool> wantsToQuit
Event Type
Extension Methods