I have a pause button in my space shooter game. When I pause, then un-pause, every time I use the space bar to shoot, it triggers the pause button. Is this because the pause button stays focused after being pressed once? Is it possible to un focus the button? I am using unity’s 4.6 GUI system.
Pause button code:
`public void pause(){
if (Time.timeScale == 1) {
Time.timeScale = 0;
pauseText.enabled = true;
mainMenuBT.gameObject.SetActive(true);
} else {
Time.timeScale = 1;
pauseText.enabled = false;
mainMenuBT.gameObject.SetActive(false);
}
}`
Any help in the right direction would be very much appreciated.