- Home /
Animator component, instead of Animation
I've pretty new to unity and C# and general development, as such i'm learning using the UGDE book by Will Goldstone as was highly recommended. I understand the book is for Unity 3.x but most of it has translated well into 4.3, but i've got to chapter 10 where i'm trying to add an animation of a fade to black.
I've followed the instructions about creating a script call "Animator" (did receive a message saying it might have issues due to script being call the same as a component)& one called "Fader". The have a GUITexture selected i've opened the Animation window and followed the steps there. within the instructions it say that the "Animation" component will automatically be added to the object, but i'm getting a "Animator" component instead. which has completely different parameters.
With the Animator component i get the fade to black working (though looping atm), but trying to follow the book i've tried removing (&/or just disabling) the Animator then manually adding the "animation" component. But if i do that the "fadeOut" animation doesn't do anything (screen is blacked out from hitting play and doesn't loop)and i receive a warning in the console.
"The AnimationClip 'fadeOut' used by the animation compoent 'fade' must be marked as legacy"
So a couple of questions;
Why is it automatically adding the "Animator Component" and not the "Animation Component"?
What does the warning message mean?
How can i get the Animation to work?
Thanks for your help in advance
Answer by yb1980 · Jan 19, 2014 at 06:15 PM
Got it sorted myself after so more trail an error. Instead of having the GUITexture selected when creating new animation clip (which seems to add the animator component), i manually added the "animation component" to the object, manually create the animation file. Once both of these steps were done i created the new animation clip and overwrite the manual one i created.
Doing this didn't add the animator component to my objects and doesn't cause the legacy error message.
Not sure if its the correct way of doing it but its the way i've found that works for me.
:)
Answer by chickenbutt44 · Feb 02, 2015 at 10:56 AM
Look at this video https://www.youtube.com/watch?v=ls5te55OCRU and start watching at 1:10. The guy shows how to fix the legacy problem
Your answer
![](https://koobas.hobune.stream/wayback/20220613130838im_/https://answers.unity.com/themes/thub/images/avi.jpg)