private static void LoadMainSceneRaw2(MainSceneInfo sceneInfo, out AsyncOperation operation) { operation = GetLoad(sceneInfo, LoadSceneMode.Single); operation.completed += (o) => OnLoadSceneCompleted(sceneInfo); var additional = sceneInfo.AdditionalStartScenes.Distinct(asi => asi.ScenePath); foreach (AdditiveSceneInfo asi in additional) { LoadAdditiveScene(asi); } }
private static void LoadMainSceneRaw(MainSceneInfo sceneInfo, TransitionInfo transition) { OnExitScene?.Invoke(); AsyncOperation operation = null; if (transition == null) { transition = DefaultTransition; } OnStartLoadingMainScene?.Invoke(() => { if (operation == null) { return(0); } else { if (operation.isDone) { return(1); } else { return(operation.progress); } } }, transition); if (transition != null && transition.StartDurration > 0) { TimeSystem.Delay(transition.StartDurration, t => LoadMainSceneRaw2(sceneInfo, out operation)); } else { LoadMainSceneRaw2(sceneInfo, out operation); } }
private static void LoadMainScene(MainSceneInfo sceneInfo, TransitionInfo transition) { SaveAllData(); LoadMainSceneRaw(sceneInfo, transition); }
private static void LoadMainScene(MainSceneInfo sceneInfo) { LoadMainScene(sceneInfo, sceneInfo.Transition); }