- Home /
Animation not playing when returning to a previous loaded scene
When I start my app, I have a animation the plays in the menu screen. This animation works great when it is first loaded upon opening the app, however, when I try to load the menu during any level of the game, the animation no longer plays in the menu screen. How can I fix this? Someone asked this question a few months ago and it never got answered. Thanks for any help.
http://answers.unity3d.com/questions/34565/animation-not-playing-when-returning-to-a-previous.html
I am not, I have just set the animation to loop. I also tried to have script set it off by using
function OnLevelLoad(level:int){ if(level == 0)[ Camera.main.animation.Play(); } }
But this does not work.
Answer by GuyTidhar · Jun 20, 2011 at 08:38 AM
Have you tried rewinding the animation?
animation.Rewind("YourAnimationName");
I have not and I will try this, but the animation is supposed to loop. I didn't think it would have to be rewinded in order to loop.
Answer by Unity_gamer · Aug 09, 2012 at 03:32 PM
I got the Same problem and i tried the above solution but didn't worked.For me the problem was with the pause section in the game , In this game when we press Pause button the Time.timescale value will change in to '0'.That was creating problem.When i changed the Time .timescale value to '1' in the Main Menu script problem solved. If you are using Time.timescale value to pause the Game just make sure that you are turning it back to 1.!!
Thanks a lot! I setted Time.timeScale to 1 and all fixes.
You save me a lot of time off debugging.
Thanx! $$anonymous$$inda silly, forgetting about the time scale :D
Answer by zakirshikhli · Jul 29, 2016 at 06:56 AM
The correct answer to Macdude2's question is Unity_gamer's answer, not GuyTidhar's
Your answer
