天天看點

06Manifest檔案得到某個包的依賴和解除安裝 AssetBundle

06Manifest檔案得到某個包的依賴和解除安裝 AssetBundle
06Manifest檔案得到某個包的依賴和解除安裝 AssetBundle
06Manifest檔案得到某個包的依賴和解除安裝 AssetBundle
LoadBundleManifest(Application.streamingAssetsPath+ "/StreamingAssets");
 
public void LoadBundleManifest(string path)
    {
        AssetBundle assetBundle=AssetBundle.LoadFromFile(path);
        AssetBundleManifest manifest=assetBundle.LoadAsset<AssetBundleManifest>("AssetBundleManifest");
        string[] names=manifest.GetAllAssetBundles(); //所有  AssetBundle的名字
        //foreach (var item in names)
        //{
        //    Debug.Log(item);
        //}
       //擷取cubewall.unity3d依賴的所有的包
        foreach (var item in manifest.GetAllDependencies("cubewall.unity3d"))
        {
            Debug.Log(item);

        }
    }      
06Manifest檔案得到某個包的依賴和解除安裝 AssetBundle