- Home /
Legacy animation system cannot animate colors?
For some reason I don't have the ability to animate color values with the legacy animation system. I use legacy because it's easier to use for fast iteration than mecanim is.
Does anyone know how I can fix this?
Answer by MakinStuffLookGood · Jan 21, 2014 at 04:35 PM
It seems the new animation features brought in with 4.3 have broken some old behaviours. You'll also find that you cannot animate sprite (ie, change the sprite in the dopesheet) with legacy animations.
As a work around, I believe you can add a script with a public color property that will work as expected in the animation editor. Then have that script set the main material color in it's Update function. Not the greatest but it should work.
Oh wow... They should really fix this sometime... Thanks anyways :)
Sorry for going Off Topic - but how do you make these small videos like the one in the OP? (what tool is used?)
Answer by sterlingr · Feb 14, 2014 at 03:39 PM
I found the solution!!!! Well, another user did, but I'm posting it because this was such a headache for us:
The problem is that Unity has changed its Material keyframe formatting when it saves animation clips. If you need to use the legacy animation system here's how to fix it:
Change animation type to 1
open the clip in a text editor, and replace classID 23 with classID 21
Still in the text editor, remove material. from the beginning of each Material attribute
Don't know if this will fix the problem for everyone, but it worked wonders for me after banging my head against a wall for a while.
-Sterling Sr. Animator - Proletariat Inc.
I open the clip in a text editor, but I can't find the CLassID 23 property. Also It shows a lot of garbage characters, isn' it a binary file?
@HendrysTobar you might have binary asset serialization turned on. Change this to "Force Text" [Edit->Project Settings->Editor] -> Asset Serialization
Answer by sreames · Jan 30, 2015 at 03:31 AM
Oh wow, just happened to be in my email when this reply came. If your just seeing symbols that means you need to save your project first. Unity only turns animation files into readable text once they are saved.
Bonus: Also, if I need to copy an animation to a prefab with a different path, I'll open it in the text editor (Notepad++ for me) and do a find replace with new path names. Easier than redoing the same animation over and over.
Good luck!
Your answer
Follow this Question
Related Questions
RGB Colors as Float Values Converter 0 Answers
How to edit legacy animation 1 Answer
Unity not playing Legacy animation 0 Answers
Mark As Legacy Animation... 2 Answers
Mecanim transitions sometimes don't work 4 Answers