Version: 2021.3
언어: 한국어

AssetDatabase.RemoveAssetBundleName

매뉴얼로 전환
public static bool RemoveAssetBundleName (string assetBundleName, bool forceRemove);

파라미터

assetBundleName The assetBundle name you want to remove.
forceRemove Flag to indicate if you want to remove the assetBundle name even it's in use.

설명

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/Remove Bundle Name")] 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); } } }