This is the 27th day of my participation in the August More Text Challenge
describe
- Application Application
- Namespace: UnityEngine
Describes the runtime data accessing the application. This class contains static methods for finding information and controlling runtime data.
A static variable
- AbsoluteURL: Absolute path to the Web player data folder (read only).
- BackgroundLoadingPriority: background loading thread priority.
- DataPath: Path to the folder containing the game data (read only).
- Genuine: Return false if the compiled application is changed in any way.
- GenuineCheckAvailable: Return true if application integrity can be verified.
- InternetReachability: Returns the current possible types of network reachability on devices.
- IsEditor: Runs inside the Unity editor
- IsLoadingLevel: Are there any scenarios being loaded (read only)
- IsPlaying: Returns true (read only) when in any kind of player.
- IsWebPlayer: does it run in a web player? (read-only)
- LevelCount: Total number of levels available. (read-only)
- LoadedLevel: Index of the last level loaded (read only), that is, the index of the level loaded or the last level loaded.
- LoadedLevelName: The name of the last level loaded. (read only) is the name of the level that was loaded or last loaded.
- PersistentDataPath: The path that contains a persistent data directory (read only).
- Platform: Returns the platform on which the game is running (read only).
- RunInBackground: Should the application be run in the background?
- SrcValue: Path of the Web player data file relative to the HTML file (read only).
- StreamedBytes: How many bytes we downloaded from the main Unity web stream (read only)
- StreamingAssetsPath: Contains a path to the StreamingAssets folder. (read-only)
- SystemLanguage: The language in which the user’s operating system is running.
- TargetFrameRate: Commands the game to attempt to render at a specific frame rate.
- TemporaryCachePath: Path containing a temporary data/cache directory (read only).
- UnityVersion: The Version of the Unity runtime used to play this content.
- WebSecurityEnabled: Indicates whether security mode for WebPlayer is enabled.
Static functions
The function name | instructions |
---|---|
CancelQuit | Cancel to exit the application. This can be used to display an exit screen when exiting the game. |
CanStreamedLevelBeLoaded | Can I stream data to load levels? |
CaptureScreenshot | Capture the screen to the filename path and save it as a PNG file. |
ExternalCall | Calls a function contained in a Web page (for Web Player only). |
ExternalEval | Invokes the snippet script function contained in the Web page (Web Player only). |
GetStreamProgressForLevel | What is the download progress? [0… 1]. |
HasProLicense | Is the Unity Pro license active? |
HasUserAuthorization | Check whether users have the right to use cameras and microphones in web pages. |
LoadLevel | Load levels by their name or index. |
LoadLevelAdditive | One level is added, that is, a new scene is loaded, and the current scene is not destroyed. |
LoadLevelAdditiveAsync | Levels are asynchronously accumulated in the background, which means that new scenes are asynchronously loaded in the background, but the current scene is not destroyed. |
LoadLevelAsync | Load levels asynchronously in the background, that is, load new scenes asynchronously in the background. |
OpenURL | Open the URL in your browser. |
Quit | Exit the application. Exiting in the editor or Web player is ignored. |
RegisterLogCallback | Registers a delegate on a log message to be invoked. |
RegisterLogCallbackThreaded | Registers a delegate on a log message to be invoked. |
RequestUserAuthorization | Request authorization to use the camera or microphone in WebPlayer. |
Code sample
stringVersion = application.version;stringEditor version = application.unityVersion; RuntimePlatform platform = application. platform;stringPath = Application. DataPath;boolIsEditor = application.isEditor;// The program exits
Application.Quit();
// Open the page
Application.OpenURL("Url link");
Copy the code