Beispiel #1
0
        static void ResetAllBundles()
        {
            if (EditorUtility.DisplayDialog("Asset Bundle Reset Confirmation", "Do you want to reset ALL AssetBundle data for this project?", "Yes", "No"))
            {
                foreach (var a in AssetDatabase.GetAllAssetPaths())
                {
                    var i = AssetImporter.GetAtPath(a);
                    if (i != null && !string.IsNullOrEmpty(i.assetBundleName))
                    {
                        i.SetAssetBundleNameAndVariant(string.Empty, string.Empty);
                    }
                }

                foreach (var b in AssetDatabase.GetAllAssetBundleNames())
                {
                    AssetDatabase.RemoveAssetBundleName(b, true);
                }
                AssetDatabase.RemoveUnusedAssetBundleNames();
                AssetBundleState.Rebuild();
            }
        }
 public AssetBundleTree(TreeViewState state, AssetListTree alt) : base(state)
 {
     AssetBundleState.Rebuild();
     m_assetList = alt;
     showBorder  = true;
 }