- Home /
I have dozens of enemies that are simply recolors of eachother. Is there a faster way of animating them than having to make new animation clips for every single one?
Hi, I'm far from the most skilled animator in Unity, so I don't know if this is a dumb question or not. But basically what I have are many many color variants of the same basic enemy types, and for these enemies I have animation clips. So my question is, is there a way to save time and a ton of effort by copying and pasting them somehow? Or do I really have no other choice than to individually animate all of them, despite being the exact same except for color differences? Thanks in advance.
You could look into using a shader that supports palette swaps via indexed colors.
Like @Cherno say. $$anonymous$$ost skilled one would use Shader to change Color based on Code ins$$anonymous$$d of using animator. And some god-like would just animated 2D with shader
Animator of unity mostly used to manage Clips. I am don't even use Animator except holding clips. I just change clip and state(blend too) through coding since it is much more flexible.
Why couldn't you attach the same animator to all your ennemies? If the hierarchy is the same for every ennemy, it should be fine.
As Hellium says, why don't you just reuse the same animator? In fact, there is no need for shader "magic" for recoloring, you can just change the material of the enemy object (and probably save it as a prefab), and you have your enemy with different color. Unless, of course, the meshes are different, but then it's not just a recolor anymore, is it?
Answer by GreatCorn · Jun 28, 2018 at 10:07 AM
If the enemies have the same rigs you can just use the same animations on them. I had similar situations and just reused some of my animations. I think changing the main parent GameObject's name won't affect anything if the rig and the bones are the same. If not - you can edit these in the animation window by selecting a bone and then pressing on it again. It will show you something like "Bip01/Bip01 Pelvis/Bip01 L Thigh". That will show you the path to that specific bone, you can change it if you need to.
Your answer
Follow this Question
Related Questions
Animations out of sync? 0 Answers
2d Animation sprites - right way? 0 Answers
animation with different sprite images 0 Answers
Changing how my character looks depending on his current lifes. 2 Answers
Animating an absolute position? 1 Answer