Version: 2018.2

Application

class in UnityEngine

Switch to Manual

Description

Доступ к данным во время выполнения приложения.

Этот класс содержит статические методы для поиска информации "об" и управления данными во время выполнения.

Static Variables

absoluteURLThe URL of the document (what is shown in a browser's address bar) for WebGL (Read Only).
backgroundLoadingPriorityПриоритет потока фоновой загрузки.
buildGUIDReturns a GUID for this build (Read Only).
cloudProjectIdA unique cloud project identifier. It is unique for every project (Read Only).
companyNameReturn application company name (Read Only).
dataPathСодержит путь к папке игровых данных (Read Only).
genuineВозвращает false, если в приложение вносятся изменения после того, как оно было собрано.
genuineCheckAvailableВозвращает true, если целостность приложения может быть подтверждена.
identifierReturns 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.
installerNameReturns the name of the store or package that installed the application (Read Only).
installModeВозвращает true, если целостность приложения может быть подтверждена.
internetReachabilityReturns the type of Internet reachability currently possible on the device.
isBatchModeReturns true when Unity is launched with the -batchmode flag from the command line (Read Only).
isConsolePlatformIs the current Runtime platform a known console platform.
isEditorМы запустились внутри редактора Unity? (Read Only)
isFocusedWhether the player currently has focus. Read-only.
isMobilePlatformIs the current Runtime platform a known mobile platform.
isPlayingReturns true when in any kind of player is active.(Read Only).
persistentDataPathСодержит путь к постоянной директории данных (Read Only).
platformСодержит путь к папке игровых данных (Read Only).
productNameReturns application product name (Read Only).
runInBackgroundShould the player be running when the application is in the background?
sandboxTypeВозвращает true, если целостность приложения может быть подтверждена.
streamingAssetsPathСодержит путь к папке StreamingAssets (Read Only).
systemLanguageThe language the user's operating system is running in.
targetFrameRateInstructs game to try to render at a specified frame rate.
temporaryCachePathСодержит путь к временным данным / директории кэша (Read Only).
unityVersionThe version of the Unity runtime used to play the content.
versionВозвращает true, если целостность приложения может быть подтверждена.

Static Functions

CanStreamedLevelBeLoadedМожет ли потоковый уровень быть загружен?
GetBuildTagsReturns an array of feature tags in use for this build.
GetStackTraceLogTypeGet stack trace logging options. The default value is StackTraceLogType.ScriptOnly.
HasProLicenseUnity активирован с Pro лицензией?
HasUserAuthorizationПроверка, чтобы пользователь разрешил использование веб камеры или микрофона в Web Player'е.
OpenURLОткрывает url в браузере.
QuitВыходит из игрового приложения.
RequestAdvertisingIdentifierAsyncRequest advertising ID for iOS, Android and Windows Store.
RequestUserAuthorizationRequest authorization to use the webcam or microphone on iOS.
SetBuildTagsSet an array of feature tags for this build.
SetStackTraceLogTypeSet stack trace logging options. The default value is StackTraceLogType.ScriptOnly.
UnloadUnloads the Unity runtime.

Events

logMessageReceivedEvent that is fired if a log message is received.
logMessageReceivedThreadedEvent that is fired if a log message is received.
lowMemoryThis event occurs when an iOS or Android device notifies of low memory while the 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 corresponds to the following callbacks on the different platforms: - iOS: [UIApplicationDelegate applicationDidReceiveMemoryWarning] - Android: onLowMemory() and onTrimMemory(level == TRIM_MEMORY_RUNNING_CRITICAL)Here is an example of handling the callback:
onBeforeRenderDelegate method used to register for "Just Before Render" input updates for VR devices.
quittingUnity raises this event when the player application is qutting.
wantsToQuitUnity raises this event when the player application wants to quit.

Delegates

AdvertisingIdentifierCallbackDelegate method for fetching advertising ID.
LogCallbackUse this delegate type with Application.logMessageReceived or Application.logMessageReceivedThreaded to monitor what gets logged.
LowMemoryCallbackThis is the delegate function when a mobile device notifies of low memory.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961