Access to application run-time data.
This class contains static methods for looking up information about and controlling the run-time data.
absoluteURL | The URL of the document. For WebGL, this is a web URL. For Android, iOS, or Universal Windows Platform (UWP) this is a deep link URL. (Read Only). |
backgroundLoadingPriority | Priority of background loading thread. |
buildGUID | Returns a GUID for this build (Read Only). |
cloudProjectId | A unique cloud project identifier. It is unique for every project (Read Only). |
companyName | Return application company name (Read Only). |
consoleLogPath | Returns the path to the console log file, or an empty string if the current platform does not support log files. |
dataPath | Contains the path to the game data folder on the target device (Read Only). |
genuine | Returns false if application is altered in any way after it was built. |
genuineCheckAvailable | Returns true if application integrity can be confirmed. |
identifier | Returns the application identifier at runtime. On Apple platforms this is the 'bundleIdentifier' saved in the info.plist file. On Android it's the 'package' from the AndroidManifest.xml. On Universal Windows platform it's the 'Identity Name' specified in the application manifest. |
installerName | Returns the name of the store or package that installed the application (Read Only). |
installMode | Returns application install mode (Read Only). |
internetReachability | Returns the type of Internet reachability currently possible on the device. |
isBatchMode | Returns true when Unity is launched with the -batchmode flag from the command line (Read Only). |
isConsolePlatform | Is the current Runtime platform a known console platform. |
isEditor | Are we running inside the Unity editor? (Read Only) |
isFocused | Whether the player currently has focus. Read-only. |
isMobilePlatform | Is the current Runtime platform a known mobile platform. |
isPlaying | Returns true when called in any kind of built Player, or when called in the Editor in Play Mode (Read Only). |
persistentDataPath | (Read Only) Contains the path to a persistent data directory. |
platform | Returns the platform the game is running on (Read Only). |
productName | Returns application product name (Read Only). |
runInBackground | Should the player be running when the application is in the background? |
sandboxType | Returns application running in sandbox (Read Only). |
streamingAssetsPath | The path to the StreamingAssets folder (Read Only). |
systemLanguage | The language the user's operating system is running in. |
targetFrameRate | Specifies the frame rate at which Unity tries to render your game. |
temporaryCachePath | Contains the path to a temporary data / cache directory (Read Only). |
unityVersion | The version of the Unity runtime used to play the content. |
version | Returns application version number (Read Only). |
CanStreamedLevelBeLoaded | Can the streamed level be loaded? |
GetBuildTags | Returns an array of feature tags in use for this build. |
GetStackTraceLogType | Get stack trace logging options. The default value is StackTraceLogType.ScriptOnly. |
HasProLicense | Is Unity activated with the Pro license? |
HasUserAuthorization | Check if the user has authorized use of the webcam or microphone in the Web Player. |
IsPlaying | Returns true if the given object is part of the playing world either in any kind of built Player or in Play Mode. |
OpenURL | Opens the URL specified, subject to the permissions and limitations of your app’s current platform and environment. This is handled in different ways depending on the nature of the URL, and with different security restrictions, depending on the runtime platform. |
Quit | Quits the player application. |
RequestAdvertisingIdentifierAsync | Request advertising ID for iOS and Windows Store. |
RequestUserAuthorization | Request authorization to use the webcam or microphone on iOS and WebGL. |
SetBuildTags | Set an array of feature tags for this build. |
SetStackTraceLogType | Set stack trace logging options. The default value is StackTraceLogType.ScriptOnly. |
Unload | Unloads the Unity Player. |
deepLinkActivated | This event is raised when an application running on Android, iOS, or the Universal Windows Platform (UWP) is activated using a deep link URL. |
focusChanged | Defines the delegate to use to register for events in which the focus gained or lost. |
logMessageReceived | Event that is fired if a log message is received. |
logMessageReceivedThreaded | Event that is fired if a log message is received. |
lowMemory | This event occurs when your app receives a low-memory notification from the device it is running on. This only occurs when your app is running in the foreground. You can release non-critical assets from memory (such as, textures or audio clips) in response to this in order to avoid the app being terminated. You can also load smaller versions of such assets. Furthermore, you should serialize any transient data to permanent storage to avoid data loss if the app is terminated.This event is supported on iOS, Android, and Universal Windows Platform (UWP).This event corresponds to the following callbacks on the different platforms:iOS: [UIApplicationDelegate applicationDidReceiveMemoryWarning]Android: onLowMemory() and onTrimMemory(level == TRIM_MEMORY_RUNNING_CRITICAL)UWP: MemoryManager.AppMemoryUsageIncreased (AppMemoryUsageLevel == OverLimit)Note: For UWP, this event will not occur on Desktop and only works on memory constrained devices, such as HoloLens and Xbox One. The OverLimit threshold specified by the OS in this case is so high it is not reasonably possible to reach it and trigger the event.Here is an example of handling the callback: |
onBeforeRender | Delegate method used to register for "Just Before Render" input updates for VR devices. |
quitting | Unity raises this event when the player application is quitting. |
unloading | Unity raises this event when Player is unloading. |
wantsToQuit | Unity raises this event when the player application wants to quit. |
AdvertisingIdentifierCallback | Delegate method for fetching advertising ID. |
LogCallback | Use this delegate type with Application.logMessageReceived or Application.logMessageReceivedThreaded to monitor what gets logged. |
LowMemoryCallback | This is the delegate function when a mobile device notifies of low memory. |