Unity遍历AassetBundle中的资源

foreach (var assetBundleName in AssetDatabase.GetAllAssetBundleNames())
        {
            foreach (var assetPathAndName in AssetDatabase.GetAssetPathsFromAssetBundle(assetBundleName))
            {
                string nameWithoutPath = assetPathAndName.Substring(assetPathAndName.LastIndexOf("/") + 1);
                string name = nameWithoutPath.Substring(0, nameWithoutPath.LastIndexOf("."));
                Debug.Log(name);
            }
        }

上一篇:Unity使用AssetDatabase编辑器资源管理之美


下一篇:java-杰克逊:在序列化时抑制JsonTypeinfo吗?