Unity 常用脚本:Application

匿名 (未验证) 提交于 2019-12-02 23:34:01

Application 

访问应用程序运行时数据。 

public static bool runInBackground { get; set; }

摘要:应用程序是否允许在后台运行时。

Application.runInBackground = true;

同样效果设置:

File ---> Build Settings… ---> Player Settings… --->

public static string dataPath { get; }

摘要:包含游戏数据(资源)文件夹的路径(只读)。

Debug.Log(Application.dataPath);

 

Debug.Log(Application.persistentDataPath);

摘要:包含到持久数据目录(只读)的路径。

Debug.Log(Application.persistentDataPath);

public static void OpenURL(string url);

摘要:在浏览器中打开url。 

参数:

  • url:url网址。
 Application.OpenURL("https://blog.csdn.net/NCZ9_");

 public static void Quit();

 摘要:退出应用程序。

转载请标明出处:Unity 常用脚本:Application
文章来源: https://blog.csdn.net/NCZ9_/article/details/90370953
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!