/// <summary> /// 关闭当前场景 /// </summary> private void HideCurrentScene(SceneBase temp) { if (temp != null) { temp.OnHiding(); if (!temp.cache) { scenes.Remove(temp.type); GameObject.Destroy(temp.gameObject); } } }
/// <summary> /// 关闭当前场景 /// </summary> private void HideCurrentScene() { if (currentSceneBase != null) { currentSceneBase.OnHiding(); currentSceneBase.gameObject.SetActive(false); currentSceneBase.OnHided(); if (!currentSceneBase.cache) { scenes.Remove(currentSceneBase.type); GameObject.Destroy(currentSceneBase.gameObject); } } }