Beispiel #1
0
        private void Save()
        {
            bundles.Clear();
            var map = GetBundles();

            foreach (var item in map)
            {
                var bundle = new BundleBuild()
                {
                    assetBundleName = item.Key,
                    assetNames      = item.Value,
                };
                bundles.Add(bundle);
            }

            foreach (var patch in patches)
            {
                for (var i = 0; i < patch.assets.Count; ++i)
                {
                    var asset = patch.assets[i];
                    if (!File.Exists(asset))
                    {
                        patch.assets.RemoveAt(i);
                        --i;
                    }
                }
            }
            EditorUtility.ClearProgressBar();
            EditorUtility.SetDirty(this);
            AssetDatabase.SaveAssets();
        }
        private void Save()
        {
            var getBundles = GetBundles();

            bundles = new BundleBuild[getBundles.Count];
            var i = 0;

            foreach (var item in getBundles)
            {
                bundles[i] = new BundleBuild
                {
                    assetBundleName = item.Key,
                    assetNames      = item.Value.ToArray()
                };
                i++;
            }

            EditorUtility.ClearProgressBar();
            EditorUtility.SetDirty(this);
            AssetDatabase.SaveAssets();
        }