IEnumerator LoadSceneAdditiveAsync(string assetEntryKey) { while (TimeUtility.DropFrameExists()) { yield return(null); } #if UNITY_EDITOR if (localMode) { string sceneName = AssetBundleUtility.GetSceneName(assetEntryKey); AsyncOperation asyncOperation = SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Additive); while (!asyncOperation.isDone) { yield return(null); } yield break; } #endif string loweredAssetEntryKey = assetEntryKey.ToLower(); AssetEntryRecord assetEntryRecord = GetAssetEntryRecord <UnityEngine.Object>(loweredAssetEntryKey, null); if (assetEntryRecord == null) { yield break; } linker.LoadSceneAdditive(assetEntryRecord, this.Table.GetNecessaryAssetBundleRecords(loweredAssetEntryKey)); }
static AsyncOperationSet GetAssetBundleRequestSceneAdditive(AssetBundle assetBundle, AssetEntryRecord assetEntryRecord) { string sceneName = AssetBundleUtility.GetSceneName(assetEntryRecord.AssetName); AsyncOperation operation = SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Additive); return(AsyncOperationSet.CreateByAsyncOperation(operation)); }