AssetBundles-Browser icon indicating copy to clipboard operation
AssetBundles-Browser copied to clipboard

Failed to delete bundle

Open bluexo opened this issue 6 years ago • 5 comments

I didn't create any AssetBundle , but the list has a unknow AssetBundle , when I delete it , occur this error :

Failed to delete bundle named: aa0b1eebb5db27a419fa4564bbe5c9c5.  Most likely this is due to the bundle being assigned to a folder in your Assets directory, AND that folder is either empty or only contains assets that are explicitly assigned elsewhere.
UnityEngine.Debug:LogError(Object)
AssetBundleBrowser.AssetBundleModel.Model:HandleBundleDelete(IEnumerable`1) (at Library/PackageCache/[email protected]/Editor/AssetBundleModel/ABModel.cs:478)
AssetBundleBrowser.AssetBundleTree:DeleteBundles(Object) (at Library/PackageCache/[email protected]/Editor/AssetBundleTree.cs:343)
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32

bluexo avatar Feb 16 '19 01:02 bluexo

sounds like you have some weird invalid data stuck in your project. Maybe try selecting some random asset, and in the bottom of the inspector, where it probably says Asset Bundle [None], click that None dropdown, and select "Remove Unused Names".

If that doesn't work, you may need to delete your Library folder. Otherwise I'm not sure how you're stuck with that data.

alffanclub avatar Feb 26 '19 17:02 alffanclub

I'm running into (what I think is) a related issue. The AssetBundle Browser will sometimes create a new, emtpy bundle that I can't delete. I've now got 3 such empty bundles (newbundle, newbundle1, and newbundle2) that I can't delete. I've tried both of the suggested fixes (using the "Remove unused names" and deleting the Library folder), neither have fixed the issue.

Another thing that I have tried is to add assets to the empty bundle and then rename it. I'm able to add assets to the bundle, but when I rename it I get the same error reported in the original post. Interestingly, it seems like the rename operation does work, because I end up with a bundle with the new name containing all the correct assets, however I get another empty bundle named newbundle. So I'm still able to create bundles, but I can't get rid of the empty newbundle bundles once the AssetBundle Browser creates them.

Please let me know if there's anything else I should try, or any other tests I can do to help debug the issue!

randomPoison avatar Mar 11 '19 16:03 randomPoison

Okay, I think I've identified the issue: If I assign an empty folder to an asset bundle, then rename the asset bundle, the empty folder will not be correctly assigned to the new bundle name. If I go in and manually assign the empty folder to the correct bundle name, I am then able to remove newbundle from the list of bundles using the "Remove Unused Names" function. It seems like AssetBundle Browser isn't correctly handling reassigning bundle tags on empty folders.

randomPoison avatar Mar 11 '19 16:03 randomPoison

I'm running into the same problem. I debug the AssetBundle Browser with adding a breakpoint in ABModolBundelInfo.cs, discovered the accurate resource assigned with the undeletable bundle name, which had been removed, then try to reassign another bundle name. Then the undeletable bundle got deleted successfuly.

royhu avatar Jul 24 '19 03:07 royhu

I got the problem as well.And There is a solution:Build the AssetsBundle and find the xxx.manifest file you have built in the build path that you set. You can find out the explicit asset or empty folder which result in the problem from the content inside the manifest file

QDShuaidou avatar Jun 26 '24 13:06 QDShuaidou