Unity教程合集Unity技术分享

unity app 安装后目录

2017-01-08  本文已影响0人  小小青蛙不怕风吹雨打

Unity app安装后的常用目录

IOS:

Android:

代码输出Application的信息

上面提到的目录都是Application的静态属性,还有很多环境属性也在Application上。

一个Debug输出代码,显示所有Application的属性值。

    private Vector2 _scroll_pos;
    void OnGUI()
    {
        string s = "Application的静态属性:\n\n";

        List<string> property_infos = new List<string>();
        foreach (System.Reflection.PropertyInfo info in typeof(Application).GetProperties())
        {
            property_infos.Add(info.Name + " = " + info.GetValue(null, null));
        }
        property_infos.Sort();

        s += String.Join("\n", property_infos.ToArray());

        _scroll_pos = GUILayout.BeginScrollView(_scroll_pos);
        GUI.skin.label.normal.textColor = Color.red;
        GUILayout.Label(s);
        GUILayout.EndScrollView();
    }

Unity的资源数据加载

Resources

AssetBundle

StreamingAssets

PersistentDataPath【安装后才有这个目录】

上一篇 下一篇

猜你喜欢

热点阅读