There is an NGUI Buttonbutton in my game, which when i pressed that button. it increaseincreases the playerplayer's power. When i
When I press the escape key., my game pausepauses completely. but NguiBut the button still working(like Hover, Clicking, TweenScaling)
void Update () {functions normally. Here's how I check for pausing:
void Update ()
{
if(Input.GetKeyDown("escape"))
{
if(isPaused && Time.timeScale == 1.0f){
Time.timeScale = 0.0f;
AudioListener.volume = 1;
}
else
{
Time.timeScale = 1.0f;
AudioListener.volume = 0;
}
}
}
I want that Button shouldI'd like the button to be deactivatedeactivated when the game pauseis paused. itIt should be visible, but not be clickingclickable or scalinganything. How can I achieve that?