How to Pause Menu with Animating Button Works?
Hello there,
I need some assistance in creating pause menu, as after browse the web I found the "timescale" method and then since implement it sadly my animation buttons also stopped. I have also browse the entire unity forums and have found couple of solutive answer in using standard boolean stuffs, or the realtime thing. But really I still couldn't get what it does really meant :(
So here's my code looks like.
Declare variable
 public GameObject blackPanel;
 public Animator restartPanel;
 public Animator optionsPanel;
And then, I put function.
 public void restartConfirm(){
         optionsPanel.SetBool("isHidden", false);
         restartPanel.SetBool("isHidden", true);
         blackPanel.SetActive (true);
         Time.timeScale=0;
     }
And after assigning the related gameobject and animator, I went to set the OnClick() function to be assigned to restartConfirm() function.
So the case here, the optionsPanel and restartPanel have animation also, as if I put Time.timeScale it will freeze everything.
I have no update() function in the script.
And then how to make the animation work well, and then paused another else?
Thanks!
Answer by hexagonius · Jan 16, 2016 at 03:20 PM
The Animator has an "Update Mode" called Unscaled Time.
From the docs:
http://docs.unity3d.com/ScriptReference/AnimatorUpdateMode.html
UnscaledTime Animator updates independently of Time.timeScale.
AWESO$$anonymous$$E ! THAN$$anonymous$$S!! Just found how easy it is :)
Your answer
 
 
             Follow this Question
Related Questions
problem with timeScale = 0 (game paused) 0 Answers
I want a countdown when unpause the game 0 Answers
How do i stop my mouse from being in first person when a pause menu appears? 0 Answers
why does timescale not work? 2 Answers
Why is my animation being started, but is not actually playing? 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                