public static IEnumerator DownLoadAssetBundle(string bundleName, OnLoadBundleFinish onLoadBundleFinish) { ResourceAPI resourceAPI = SimpleFactory.CreateResourceAPI(); DownLoadEventAPI downLoadEventAPI = SimpleFactory.CreateDownLoadEventAPI(); downLoadEventAPI.OnLoadBundleDelegate += onLoadBundleFinish; yield return(resourceAPI.LoadAssetBundle(bundleName, downLoadEventAPI)); }
IEnumerator CreateIEnumerator() { ResourceAPI resourceAPI = SimpleFactory.CreateResourceAPI(); DownLoadEventAPI downLoadEventAPI = SimpleFactory.CreateDownLoadEventAPI(); downLoadEventAPI.OnLoadBundleDelegate += (AssetBundle bundle) => { UIPackage.AddPackage(bundle); this.Inst <WindowManage>().OpenWindow(WindowNameFactory.GetLoginWindowName()); }; yield return(resourceAPI.LoadAssetBundle(BundleConst.WindowframeBundleName, downLoadEventAPI)); }