- Home /
Question by
actionfence · Jun 24, 2015 at 10:09 PM ·
javascriptbuttoninput manager
Strange InputManager Problem
Okay, normally I can find the answer to my question, but this time I have been unable to.
Basically I am trying to make a HUD overlay, that will change to a pause menu upon touch button.
Here's my JS script:
#pragma strict
public var hUDOver : GameObject;
public var pauseMenu : GameObject;
public var statusMenu : GameObject;
function Start ()
{
hUDOver.SetActive(true);
pauseMenu.SetActive(false);
statusMenu.SetActive(false);
}
function Update ()
{
if (Input.GetButtonUp("Fire1"))
{
hUDOver.SetActive(false);
pauseMenu.SetActive(true);
statusMenu.SetActive(true);
}
}
This script works, but when I go into Input Manager and create a button "PauseMenu", go into this script and change "Fire1" to "PauseMenu", and change the Button Handler to "PauseMenu" it doesn't work at all.
Mainly I'm just trying to get Input Manager to accept new buttons, where I can use them.
Anyone have any idea on how to fix my problem?
Comment
Best Answer
Answer by actionfence · Jun 26, 2015 at 07:55 AM
Nevermind, I fixed this problem using the Button Standard Assets "OnClick()" triggers.
Your answer
![](https://koobas.hobune.stream/wayback/20220613201347im_/https://answers.unity.com/themes/thub/images/avi.jpg)