- Home /
Unity 5 animation clip length changes
I have a canvas with several panel's for displaying various UI menus. On one specific menu panel I use a very short animation to fade-in the panel (0.1 seconds), and when the user is done with this menu I use a long animation to fade-out the panel (1 second). When I execute (button click to display menu) the first time everything runs perfect. If I click the button to display that same menu panel any subsequent times, the fade-in is no longer the short .1 second, but takes the same length as the fade-out.
I've tried changing the fade-out length to 2 seconds, 4 seconds, etc. Each subsequent time I display the menu panel the fade-in takes on the length of what ever the fade-out is. I'm not sure why this is happening, but I'm hoping someone can help.
I have one animator controller, which has two clips: fade-in and fade-out. FYI, fade-out is not a copy of fade-in with the speed reversed. Both clips are separate animations with different time lengths. I use a Bool parameter to trigger the fade in/out. If set to true the menu is displayed, if false the menu hides (fades-out). The fade is done using the alph of the panel canvas group component.
Any help or tips would be greatly appreciated.
Your answer
![](https://koobas.hobune.stream/wayback/20220613200739im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Remove unused animation curves? (Animation.Update() optimizing) 1 Answer
Animation not looping 1 Answer
How to Serialize an AnimationState 0 Answers
Parameterized Animation Clip 0 Answers
Animation Help Needed (Method Not Found) 2 Answers