AssetBundles-Browser icon indicating copy to clipboard operation
AssetBundles-Browser copied to clipboard

【ABModel.cs】IndexOutOfRangeException: Index was outside the bounds of the array.

Open Rootjhon opened this issue 6 years ago • 0 comments

ABModel.cs

        internal static int RegisterAsset(AssetInfo asset, string bundle)
        {
            if(s_DependencyTracker.ContainsKey(asset.fullAssetName))
            {
                s_DependencyTracker[asset.fullAssetName].Add(bundle);
                int count = s_DependencyTracker[asset.fullAssetName].Count;
                if (count > 1)
                    asset.SetMessageFlag(MessageSystem.MessageFlag.AssetsDuplicatedInMultBundles, true);
                return count;
            }

            var bundles = new HashSet<string>();
            bundles.Add(bundle);
            s_DependencyTracker.Add(asset.fullAssetName, bundles);
            return 1;            
        }
IndexOutOfRangeException: Index was outside the bounds of the array.
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
AssetBundleBrowser.AssetBundleModel.Model.RegisterAsset (AssetBundleBrowser.AssetBundleModel.AssetInfo asset, System.String bundle) (at Assets/Editor/AssetBundles-Browser/AssetBundleModel/ABModel.cs:715)
.....

Rootjhon avatar Jan 02 '19 01:01 Rootjhon