Example #1
0
        protected bool LoadDependencies(string bundleName)
        {
            bool _ret = true;

            if (m_manifest != null)
            {
                List <string> _dpList;
                if (m_manifest.TryGetValue(bundleName, out _dpList))
                {
                    foreach (string _abName in _dpList)
                    {
                        bool _find = false;
                        for (int _i = 0, _max = m_bundleList.Count; _i < _max; _i++)
                        {
                            var _item = m_bundleList[_i];
                            if (!_item.Name.Equals(_abName))
                            {
                                continue;
                            }
                            _item.Retain();
                            _find = true;
                            break;
                        }

                        if (!_find)
                        {
                            BundleItem _bundleItem = new BundleItem(_abName);
                            m_bundleList.Add(_bundleItem);
                            _bundleItem.Load();
                            _bundleItem.Retain();
                        }
                    }
                }
                else
                {
                    Debug.Log(string.Format("BundleName {0} is Error", bundleName));
                    _ret = false;
                }
            }
            return(_ret);
        }
Example #2
0
 internal override void Load()
 {
     m_bundle = GameManager.ResManager.LoadAssetBundleSync(m_assetBundleName);
     m_asset  = m_bundle.Bundle.LoadAsset(m_name, m_assetType);
 }