bugfixing
added canvas objects to all scenes (and event systems with them), game should be playable all the way through maybe!
This commit is contained in:
@@ -36,7 +36,7 @@ public class StateController : MonoBehaviour {
|
||||
SceneManager.sceneLoaded += OnSceneLoaded;
|
||||
|
||||
if (inDebugMode) {
|
||||
debugCanvas = GameObject.FindGameObjectWithTag("DebugCanvas");
|
||||
debugCanvas = GameObject.Find("DebugCanvas");
|
||||
debugCanvas.SetActive(false);
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,9 @@ public class StateController : MonoBehaviour {
|
||||
deathCanvas = GameObject.Find("DeathUICanvas");
|
||||
if (deathCanvas != null) {
|
||||
Button respawnButton = GameObject.Find("RespawnButton").GetComponent<Button>();
|
||||
if (respawnButton == null) {
|
||||
print("respawn button not found!");
|
||||
}
|
||||
respawnButton.onClick.AddListener(RespawnPlayer);
|
||||
deathCanvas.SetActive(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user