返回介绍

Application 应用程序

发布于 2019-12-18 15:37:18 字数 9175 浏览 957 评论 0 收藏 0

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).
到web播放器数据文件夹的绝对路径(只读)。
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)
是在Unity编辑器内运行?
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).
相对于html文件的web播放器数据文件的路径(只读)。
streamedBytesHow many bytes have we downloaded from the main unity web stream (Read Only).
我们从主Unity网页流中下载了多少字节(只读)
streamingAssetsPathContains the path to the StreamingAssets folder (Read Only).
包含一个到StreamingAssets文件夹的路径。(只读)
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.
用于播放该内容的Unity运行时的版本。
webSecurityEnabledIndicates whether Unity's webplayer security model is enabled.
指示是否webplayer的安全模式是否被启用。

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.
捕捉屏幕到filename路径,保存为PNG文件。
ExternalCallCalls a function in the containing web page (Web Player only).
调用一个包含在网页中的函数(只用于Web Player)。
ExternalEvalEvaluates script snippet in the containing web page (Web Player only).
调用包含在网页中的片段脚本函数(只用于Web Player)。
GetStreamProgressForLevelHow far has the download progressed? [0…1].
下载的进度是多少?
HasProLicenseIs Unity activated with the Pro license?
是具有Unity Pro许可证激活?
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.
在浏览器中打开url 。
QuitQuits the player application.
退出应用程序。在编辑器或者web播放器中退出被忽略。
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.
在webplayer请求授权使用摄像头或麦克风。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文