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:
@@ -18,7 +18,7 @@ public class SceneController : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy(this);
|
||||
Destroy(this.gameObject);
|
||||
return;
|
||||
}
|
||||
// Make this object stay around when switching scenes
|
||||
@@ -31,8 +31,8 @@ public class SceneController : MonoBehaviour
|
||||
GameObject pauseMenu = GameObject.Find("PauseMenuCanvas");
|
||||
if (pauseMenu != null)
|
||||
{
|
||||
Button quitButton = GameObject.Find("QuitButton").GetComponent<Button>();
|
||||
quitButton.onClick.AddListener(BackToMainMenu);
|
||||
// Button quitButton = GameObject.Find("QuitButton").GetComponent<Button>();
|
||||
// quitButton.onClick.AddListener(BackToMainMenu);
|
||||
}
|
||||
if (scene.buildIndex == 0)
|
||||
{ // if this is the menu
|
||||
|
||||
Reference in New Issue
Block a user