public IEnumerator DonwLoadTestWithEnumeratorPasses() { string assetName = "simpleui_fui.windowframe"; ResourceManager resourceManager = new ResourceManager(); CombineDownLoadHelp combineDownLoad = new CombineDownLoadHelp(); yield return(resourceManager.LoadAssetBundle(assetName, combineDownLoad)); AssetBundle assetBundle = combineDownLoad.GetBundle(); Assert.AreNotEqual(assetBundle, null); bool release = resourceManager.ReleaseAsset(assetName); Assert.AreEqual(release, true); yield return(assetBundle); }
public IEnumerator LoadAssetBundle(string keyName, CombineDownLoadHelp combineLoadHelp) { AssetBundle assetBundle = null; bool hasBundle = bundlelist.ContainsKey(keyName) && bundlelist[keyName].Bundle != null; if (!hasBundle) { DownLoadHelp downLoadHelp = new DownLoadHelp(); yield return(DownLoadAsset(keyName, downLoadHelp)); } if (bundlelist.ContainsKey(keyName)) { assetBundle = bundlelist[keyName].PlusCount(); } if (assetBundle != null) { combineLoadHelp.OnLoadAssetBundle(assetBundle); } yield return(null); }