void OpenScene(SceneBase scene) { Log("Open: " + scene); if (scene == null) { Log("Wrong Scene"); return; } if (!scene.gameObject.activeSelf) { scene.gameObject.SetActive(true); } if (!scene.enabled) { scene.enabled = true; } scene.Initialization(); // シーンの初期化 // EVENT / 遷移開始 if (eventTransition != null) { eventTransition(scene, TransitionType.OPEN_START); } openTransitionScene = scene; // 遷移中のシーン currentScene = null; scene.eventOpenComplete += SceneOpenComplete; scene.OpenScene(); }
void CloseSceneComplete(SceneBase closeScene) { if (closeScene.gameObject.activeSelf) { closeScene.gameObject.SetActive(false); } if (closeScene.enabled) { closeScene.enabled = false; } closeScene.Initialization(); // EVENT if (eventTransition != null) { eventTransition(closeScene, TransitionType.CLOSE_COMP); } }