Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Discussion What is the best way to create sprite animations for heaps of chars?

Discussion in 'Animation' started by lobador, Dec 27, 2022.

  1. lobador

    lobador

    Joined:
    May 29, 2020
    Posts:
    13
    Hello,

    I have lots of different characters. I want to create the same walking, running, hurt, die, etc... animations for all characters. In the animator, each of them should have the same rules as below.

    Should I create different animation controls and different animations for each character?

    Let's say I have 50 characters so do I need to create 50 animation controllers and 50 x animations?

    Or is there any easy, recommended way to do this?

    Thank you so much for your attention and participation.

    upload_2022-12-27_13-44-9.png

    upload_2022-12-27_13-45-27.png
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,342
    Don't use the Animator for this! It's far to complex for your use case.

    Simply use an Animation, stick the clips you want in there, and just Play("Hurt"), Play("Idle"), etc.
     
  3. lobador

    lobador

    Joined:
    May 29, 2020
    Posts:
    13
    Hi @Baste thank you so much for your answer. Actually, your idea sounds very cool but I think just using animation and Play("state") should be a legacy thing. It shouldn't support now. am I wrong?
     
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,342
    Unity was planning on deprecating the Animation component, but went back on that because it's got better performance than the Animator, and is a lot simpler, and a proper replacement is very far off.
     
    lobador likes this.