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(); } }
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(); }