Ejemplo n.º 1
0
        private void HintInit()
        {
            hintMap            = new Dictionary <string, AssetBundleHint>();
            loadedAssetHintMap = new Dictionary <long, AssetBundleHint>();
            foreach (var pair in AssetBundleConfig.map)
            {
                var name = pair.Key;
                var node = pair.Value;
                hintMap[name] = new AssetBundleHint()
                {
                    bundlePath = BundleTool.GetBundleFilePath(node.assetName),
                    assetName  = node.assetName
                };
            }

            foreach (var pair in AssetBundleConfig.map)
            {
                var name = pair.Key;
                var node = pair.Value;
                var hint = hintMap[name];
                foreach (var depName in node.depenceList)
                {
                    hint.dependenceList.Add(hintMap[depName]);
                }
            }
        }
Ejemplo n.º 2
0
        private AssetBundleHint HintGet(string path)
        {
            var             name = BundleTool.GetAssetName(path);
            AssetBundleHint hint;

            hintMap.TryGetValue(name, out hint);
            return(hint);
        }