Search Unity

Legacy vs Mecanim performance

Discussion in 'Animation' started by VictorKs, Mar 19, 2018.

  1. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    I'm currently working on a rts game with a limit of 1000 agents each having an animator controller. I use a total of 15 animations for each agent, no root motion. What is the performance difference between generic and legacy?? Logic is simple default is Idle and 4 integer parameters for AttackNo/HitNo/DefenseNo/DeathNo.
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    drawcode and VictorKs like this.
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    Simple Animation still uses Animator (without a controller, but still), so it won't really be any faster.

    And I don't know about Legacy being removed, it seems Unity can't decide. Or at the very least, I think they're keeping it around as an excuse. From the comments in this : https://blogs.unity3d.com/2017/11/28/introducing-the-simple-animation-component/

    So Legacy is getting removed, but they won't provide an as fast equivalent for simple stuff, because we already have Legacy (which is deprecated and since it's deprecated they won't fix the bugs they introduced to it)!

    Yup, that makes sense.
     
    Shushustorm, drawcode and VictorKs like this.
  4. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    Thanks for the replies I just got a little concerned because of some posts claiming unity can't support more than 500 animators efficiently. But turns out it can support 500 and a lot more. Humanoid and IK though are an issue when having lots of units.
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    If the IK is for gameplay purposes, I agree it gets tricky, but if it is decoupled then we can fade it out surprisingly close.