Ejemplo n.º 1
0
 private void SyncLoadAssetBundleDependences(string bundleName, string referName)
 {
     if (abDict.ContainsKey(bundleName))
     {
         abDict[bundleName].AddReference(referName);
     }
     else
     {
         ABRelationManager abLoader = new ABRelationManager(bundleName, null);
         abDict.Add(bundleName, abLoader);
         abLoader.AddReference(referName);
         abLoader.SyncLoadAssetBundle();
     }
 }
Ejemplo n.º 2
0
        public void SyncLoadAssetBundle(string bundleName)
        {
            if (abDict.ContainsKey(bundleName))
            {
                return;
            }
            ABRelationManager abLoader = new ABRelationManager(bundleName, null);

            abDict.Add(bundleName, abLoader);
            string[] dependence = ABManifestLoader.Instance.GetDependence(bundleName);
            abLoader.SetDependence(dependence);
            for (int i = 0; i < dependence.Length; ++i)
            {
                SyncLoadAssetBundleDependences(dependence[i], bundleName);
            }
            abLoader.SyncLoadAssetBundle();
        }