Example #1
0
        public IEnumerator LoadABReference(string abName, string refABName)
        {
            if (string.IsNullOrEmpty(abName) || string.IsNullOrEmpty(refABName))
            {
                Debug.LogError(GetType() + "/LoadABReference()/参数abName或refABName不能为空,请检查!");
                yield break;
            }
            if (m_DicABRelation.ContainsKey(abName))
            {
                ABRelation tmpABRelation = m_DicABRelation[abName];
                tmpABRelation.AddABReference(refABName);
            }
            else
            {
                ABRelation tmpABRelation = new ABRelation(abName);
                tmpABRelation.AddABReference(refABName);
                m_DicABRelation.Add(abName, tmpABRelation);

                yield return(LoadAssetbundle(abName));
            }
        }