fixed: menu navigation, singleton bugs

quit buttons in pause menus are fixed. also the persistent data objects were not deleting themselves if another copy exists, so that's been fixed
This commit is contained in:
Sam
2023-05-05 13:20:14 -07:00
parent e8fcb4e3c4
commit 043f777207
4 changed files with 22 additions and 23 deletions

View File

@@ -6,10 +6,18 @@ using TMPro;
public class DebugSceneSwitcher : MonoBehaviour
{
public static DebugSceneSwitcher Instance = null;
public bool showDropdown;
void Awake()
{
if (Instance == null) {
Instance = this;
} else {
Destroy(this.gameObject);
return;
}
// Keep the object around when we switch scenes
DontDestroyOnLoad(this.gameObject);
CreateDropdownOptions();