diff --git a/QSB/Menus/MenuManager.cs b/QSB/Menus/MenuManager.cs index 4c70ee19..636803a0 100644 --- a/QSB/Menus/MenuManager.cs +++ b/QSB/Menus/MenuManager.cs @@ -54,9 +54,12 @@ internal class MenuManager : MonoBehaviour, IAddComponentOnStart { Instance = this; - _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); + if (!_choicePopupPrefab) + { + _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;