Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

Application

Namespace: UnityEngine

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.
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.
internetReachabilityReturns the type of Internet reachability currently possible on the device.
isEditorAre we running inside the Unity editor? (Read Only)
isLoadingLevelIs some level being loaded? (Read Only)
isPlayingReturns true when in any kind of player (Read Only).
isWebPlayerAre we running inside a web player? (Read Only)
levelCountThe total number of levels available (Read Only).
loadedLevelThe level index that was last loaded (Read Only).
loadedLevelNameThe name of the level that was last loaded (Read Only).
persistentDataPathContains the path to a persistent data directory (Read Only).
platformReturns the platform the game is running (Read Only).
runInBackgroundShould the player be running when the application is in the background?
srcValueThe path to the web player data file relative to the html file (Read Only).
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.
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 containing web page (Web Player only).
ExternalEvalEvaluates script snippet in the containing web page (Web Player only).
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.
LoadLevelLoads the level by its name or index.
LoadLevelAdditiveLoads a level additively.
LoadLevelAdditiveAsyncLoads the level additively and asynchronously in the background.
LoadLevelAsyncLoads the level asynchronously in the background.
OpenURLOpens the url in a browser.
QuitQuits the player application.
RegisterLogCallbackRegister a delegate to be called on log messages.
RegisterLogCallbackThreadedRegister a delegate to be called on log messages.
RequestUserAuthorizationRequest authorization to use the webcam or microphone in the Web Player.