AssetDatabase.RemoveAssetBundleName

Switch to Manual
public static bool RemoveAssetBundleName (string assetBundleName, bool forceRemove);

Parameters

assetBundleNameThe assetBundle name you want to remove.
forceRemoveFlag to indicate if you want to remove the assetBundle name even it's in use.

Description

Remove the assetBundle name from the asset database. The forceRemove flag is used to indicate if you want to remove it even it's in use.

using UnityEditor;
using UnityEngine;

public class AssetDatabaseExamples : MonoBehaviour { [MenuItem("AssetDatabase/RemoveBundleName")] static void RemoveAssetBundleNameExample() { //Remove Asset Bundle name that is on Cube.prefab and it's dependencies var prefabPath = "Assets/Prefabs/Cube.prefab"; var assetBundleName = AssetDatabase.GetImplicitAssetBundleName(prefabPath); var assetBundleDependencies = AssetDatabase.GetAssetBundleDependencies(assetBundleName, true); AssetDatabase.RemoveAssetBundleName(assetBundleName, true); foreach (var bundleName in assetBundleDependencies) { AssetDatabase.RemoveAssetBundleName(bundleName, true); } } }