0
votes

I have two different prefab for melee/ranged enemies that I spawn with the correct corresponding ScriptableObject Data. I have everything working but now realized a possible mistake when I wanted to add animations and sprites.

How do I add multiple animations to a single prefab for different enemies? The enemy data can hold a single sprite but how can I make it hold an animation? I dont see it possible to store every single animation in the prefabs.

1

1 Answers

0
votes

In the prefab you don't have to store the animation, you store an Animator Controller, where is the state machine diagram wich controls the differents animations of your characters.

You said that you have different kinds of enemys. Well, if they share the same graph but they had their owns specific animations, you can also use the Animator Controller Override, to only have to change animations for different types of characters.