예제 #1
0
    protected void UpdateBundleContents()
    {
        var listing = target as AssetBundleListing;

        foreach (var plat in Settings.platforms)
        {
            AssetBundleContents bundle = listing.GetBundleForPlatform(plat.name);
            bundle.assets.Clear();
            foreach (ListingEditorEntry entry in assets)
            {
                BundleContentsEntry bundleEntry = new BundleContentsEntry();
                bundleEntry.name  = entry.name;
                bundleEntry.asset = entry.GetAssetForPlatformOrInherited(plat.name, out bundleEntry.isInherited);
                bundle.assets.Add(bundleEntry);
            }
            EditorUtility.SetDirty(bundle);
        }
        EditorUtility.SetDirty(listing);
    }
 protected void UpdateBundleContents()
 {
     var listing = target as AssetBundleListing;
     foreach(var plat in Settings.platforms){
         AssetBundleContents bundle = listing.GetBundleForPlatform(plat.name);
         bundle.assets.Clear();
         foreach(ListingEditorEntry entry in assets){
             BundleContentsEntry bundleEntry = new BundleContentsEntry();
             bundleEntry.name = entry.name;
             bundleEntry.asset = entry.GetAssetForPlatformOrInherited(plat.name, out bundleEntry.isInherited);
             bundle.assets.Add(bundleEntry);
         }
         EditorUtility.SetDirty(bundle);
     }
     EditorUtility.SetDirty(listing);
 }