From 0c6f4957181090de67e117e64f85ae179ac89520 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Tue, 2 Aug 2022 12:22:18 -0700 Subject: [PATCH] rename --- QSB/Menus/MenuManager.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/QSB/Menus/MenuManager.cs b/QSB/Menus/MenuManager.cs index 42c3bb70..d0593f13 100644 --- a/QSB/Menus/MenuManager.cs +++ b/QSB/Menus/MenuManager.cs @@ -48,15 +48,15 @@ internal class MenuManager : MonoBehaviour, IAddComponentOnStart private bool _intentionalDisconnect; - private GameObject _threeChoicePopupBase; + private GameObject _choicePopupPrefab; public void Start() { Instance = this; - _threeChoicePopupBase = Instantiate(Resources.FindObjectsOfTypeAll().First(x => x.name == "TwoButton-Popup" && x.transform.parent.name == "PopupCanvas" && x.transform.parent.parent.name == "TitleMenu").gameObject); - DontDestroyOnLoad(_threeChoicePopupBase); - _threeChoicePopupBase.SetActive(false); + _choicePopupPrefab = Instantiate(Resources.FindObjectsOfTypeAll().First(x => x.name == "TwoButton-Popup" && x.transform.parent.name == "PopupCanvas" && x.transform.parent.parent.name == "TitleMenu").gameObject); + DontDestroyOnLoad(_choicePopupPrefab); + _choicePopupPrefab.SetActive(false); MakeTitleMenus(); QSBSceneManager.OnSceneLoaded += OnSceneLoaded; @@ -176,7 +176,7 @@ internal class MenuManager : MonoBehaviour, IAddComponentOnStart public ThreeChoicePopupMenu CreateThreeChoicePopup(string message, string confirm1Text, string confirm2Text, string cancelText) { - var newPopup = Instantiate(_threeChoicePopupBase); + var newPopup = Instantiate(_choicePopupPrefab); switch (LoadManager.GetCurrentScene()) { @@ -228,7 +228,7 @@ internal class MenuManager : MonoBehaviour, IAddComponentOnStart public FourChoicePopupMenu CreateFourChoicePopup(string message, string confirm1Text, string confirm2Text, string confirm3Text, string cancelText) { - var newPopup = Instantiate(_threeChoicePopupBase); + var newPopup = Instantiate(_choicePopupPrefab); switch (LoadManager.GetCurrentScene()) {