- Home /
How do you make an UI animation longer than one second?
I'm instantiating a UI element onto my Canvas and I want its animation to play for two seconds. However, right now it's playing for only one second because I can't find out for the life of me how to make this thing play longer in the Animation window or through script. How do I simply make it play over two seconds?
Answer by xxmariofer · Dec 04, 2020 at 08:45 AM
Hello, using the wheel from the mouse you can zoom out and see longer times in the animation window
That's not possible. If you look at the scrollbar at the bottom of the window, there's no room to scroll, and the zoom is already maxed hence why it spans the complete length.
yes it is posible, answer is more like a hack than an actual solution and once you start adding multiple animations and complex animation trees is completly imposible to handle
Answer by randyhuynh · Dec 04, 2020 at 07:18 PM
I found out last night how to do it. I removed the animation component from my UI Element and replaced it with an Animator component and attached a new Animator Controller. I opened up the Animator Controller to get into the Animator window, and there I dropped in my previous animation onto the grid and it was automatically linked with the "Entry" node. I then selected the animation I dropped in and in the Inspector changed the speed to 0.5 to make my 1-second clip into 2-seconds.
Hope that helps anyone else that runs into this problem.
Answer by Oleksandr_Kryvonos · Apr 16, 2021 at 09:53 PM
i found out how to extend animation beyond 1 second,
first zoom out timeline using mouse scroll wheel to see more seconds,
then you need to add key frame after one second, this action will extend
animation timing
If you change from "Dopesheet" to "Curves" you can grab the endpoint of your animation and drag it to the new time position, stretching your 1 second animation over the 2 seconds. Note you will still need to move any intermediate keyframes you have, but it's quick for a simple animation.