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.youkuaiyun.com/NCZ9_");
public static void Quit();
摘要:退出应用程序。