其他分享
首页 > 其他分享> > Unity遍历AassetBundle中的资源

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);
            }
        }

标签:assetPathAndName,遍历,LastIndexOf,nameWithoutPath,AssetDatabase,name,Unity,AassetB
来源: https://blog.csdn.net/SummerRain0308/article/details/91579915