Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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,294
    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,294
    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.