// 3.加载完成后实例化场景 private void SceneBundleLoadEnd(AssetBundleLoader loader) { if (loader != null) { // 把资源存储起来 AssetBundleStorer.Add(sceneBundleName, loader.bundle); } base.StartCoroutine("SceneInstantiateRoutine"); }
// 2.文本信息包加载完成后加载场景包 private void StgDataBundleLoadEnd(AssetBundleLoader loader) { // 将文本资源存储起来 AssetBundleStorer.Add(stgDataBundleName, loader.bundle); TextAsset textAsset = loader.bundle.LoadAsset(stgConfig.configureName, typeof(TextAsset)) as TextAsset; Debug.Log(textAsset.text); stgData = StgDataManager.LoadStgData(textAsset); sceneName = stgData.dataHead.map; sceneBundleName = "_scene" + sceneName; // 加载场景包 this.LoadScene(); }