Legacy Documentation: Version 5.3
LanguageEnglish
  • C#
  • JS

Script language

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

Application

class in UnityEngine

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

Sumbission failed

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

Close

Cancel

Description

Access to application run-time data.

This class contains static methods for looking up information about and controlling the run-time data.

Static Variables

absoluteURLThe absolute path to the web player data file (Read Only).
backgroundLoadingPriorityPriority of background loading thread.
bundleIdentifierReturns application bundle identifier at runtime.
cloudProjectIdA unique cloud project identifier. It is unique for every project (Read Only).
companyNameReturn application company name (Read Only).
dataPathContains the path to the game data folder (Read Only).
genuineReturns false if application is altered in any way after it was built.
genuineCheckAvailableReturns true if application integrity can be confirmed.
installModeReturns application install mode (Read Only).
internetReachabilityReturns the type of Internet reachability currently possible on the device.
isConsolePlatformIs the current Runtime platform a known console platform.
isEditorAre we running inside the Unity editor? (Read Only)
isMobilePlatformIs the current Runtime platform a known mobile platform.
isPlayingReturns true when in any kind of player (Read Only).
isShowingSplashScreenChecks whether splash screen is being shown.
isWebPlayerAre we running inside a web player? (Read Only)
persistentDataPathContains the path to a persistent data directory (Read Only).
platformReturns the platform the game is running on (Read Only).
productNameReturns application product name (Read Only).
runInBackgroundShould the player be running when the application is in the background?
sandboxTypeReturns application running in sandbox (Read Only).
srcValueThe path to the web player data file relative to the html file (Read Only).
stackTraceLogTypeStack trace logging options. The default value is StackTraceLogType.ScriptOnly.
streamedBytesHow many bytes have we downloaded from the main unity web stream (Read Only).
streamingAssetsPathContains the path to the StreamingAssets folder (Read Only).
systemLanguageThe language the user's operating system is running in.
targetFrameRateInstructs game to try to render at a specified frame rate.
temporaryCachePathContains the path to a temporary data / cache directory (Read Only).
unityVersionThe version of the Unity runtime used to play the content.
versionReturns application version number (Read Only).
webSecurityEnabledIndicates whether Unity's webplayer security model is enabled.

Static Functions

CancelQuitCancels quitting the application. This is useful for showing a splash screen at the end of a game.
CanStreamedLevelBeLoadedCan the streamed level be loaded?
CaptureScreenshotCaptures a screenshot at path filename as a PNG file.
ExternalCallCalls a function in the web page that contains the Unity Web Player or WebGL player.
ExternalEvalEvaluates script function in the containing web page.
GetStreamProgressForLevelHow far has the download progressed? [0...1].
HasProLicenseIs Unity activated with the Pro license?
HasUserAuthorizationCheck if the user has authorized use of the webcam or microphone in the Web Player.
OpenURLOpens the url in a browser.
QuitQuits the player application.
RequestAdvertisingIdentifierAsyncRequest advertising ID for iOS, Android and Windows Store.
RequestUserAuthorizationRequest authorization to use the webcam or microphone in the Web Player.

Delegates

AdvertisingIdentifierCallbackDelegate method for fetching advertising ID.
LogCallbackUse this delegate type with Application.logMessageReceived or Application.logMessageReceivedThreaded to monitor what gets logged.