1
votes

I am new unity.

I have already watched this tutorial in https://www.youtube.com/watch?v=FNp_y_Ickhs

When i do step by step from above tutorial (above link). As a result, I get: + two animation: idle status and move status. (animation tab) + One animator: take transition to transfer from idle status to move status by press key. (animator tab)

But i want to add new another character with other color. Surely, i should create two new animation from my sprite. How i can reuse above animator, i don't want to create transitions to transfer status again.

I have a lot of characters with another colors in a scene.They have same status (move left, move right, move up, move down and idle). So i want to reuse animator.

Please help me, thanks a lot. (If you don't understand, please tell me, i will explain further)

More information:

I have 40 objects with animations. They all have different skeletons and animation lengths, but the all objects have animations with the same names (e.g. "idle" and "action"). Is there a way to have a single Animator Controller for all of my all objects.

1
I am not an expert but don't you just import one character with animations and make a prefab from it? If you reuse (instantiate a new object from prefab) it should already have animations attached to ituser2140173
I have 40 objects with animations. They all have different skeletons and animation lengths, but the all objects have animations with the same names (e.g. "idle" and "action"). Is there a way to have a single Animator Controller for all of my all objects. Thanks @mehowuser3421905

1 Answers

1
votes

Just duplicate the object and change the sprite. The Animator component is what handles the animations you created, you can add the same Animator handler to whatever object you want. You obviously need the script to change the Animator variable you're using to change the animation. A classic copy-paste.

Here's more information about Unity's Animator Component