I am sure I am just missing something extremely obvious here but my pause script doesn’t seem to be catching a button press that my other scripts are. For example Here is a script I am using to just monitor controller input independent of the game.
if (Input.GetButton("Pause")) {
debugOUT.text += "
" + “Pause: True”;
} else {
debugOUT.text += "
" + “Pause: False”;
}
^ this works just fine. However my pause script doesn’t seem to catch the button press at all.
void Update () {
if (Input.GetButtonDown("Pause")) {
Debug.Log("Pause!");
if (!isPaused) {
pauseTXT.gameObject.SetActive(true);
Time.timeScale = 0;
isPaused = true;
} else {
pauseTXT.gameObject.SetActive(false);
Time.timeScale = 1f;
isPaused = false;
}
}
}
I can’t figure out why that second script doesn’t seem to work at all. The button is obviously setup correctly in input manager since it can be caught from another script. This one just doesn’t seem to catch it…
So I found that the issue is that Input.GetButtonDown("Pause") does not work but Input.GetButton works but does not function as I would like it to. Here is how I have the button setup in the input manager [10036-input.png|10036]
– darthbator