Search Unity

Question Animator / Mecanim WORST Practices

Discussion in 'Animation' started by FaffyWaffles, May 1, 2021.

  1. FaffyWaffles

    FaffyWaffles

    Joined:
    Apr 10, 2020
    Posts:
    45
    For a person who is relatively new but has a generally good understanding of Unity, C# and the Animator...

    What are some of the Straight Up WORST possible things you could do that will lead to hours of frustration?

    I'm not just talking about spaghetti code/ an unorganized animator either.
    What are some things that people thought were good ideas, but were in fact very very bad ideas?
    What solutions to problems seem easier than another, but will lead to tons of problems later on?
    What are some problems that come about, but are unable to be fixed because of some technique?
    What horror stories do y'all have

    (I'm asking so I don't accidently do something that would be considered a sin to other devs.)

    Again, I'd really appreciate any insight from anyone. Thanks :)
     
  2. I immediately can mention two things:
    - using animator and/or even animation components/assets for everything, even where simple tweening would have been more than enough
    - building up layers and layers of different animations on top of each other and then expecting to just work and being super-performant

    Disclaimer: I'm not an animator by any means, I'm a solo dev, so I have to do many things myself (when I'm not paying someone to do stuff for me).
     
    FaffyWaffles likes this.
  3. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Animator Controllers were a very bad idea. The whole system is full of stupid design decisions and unnecessary limitations that force you to write bad code and rely on logic that is impossible to debug effectively. I wrote a lot more detail about the problems in the Why Replace Mecanim section of the Animancer documentation.

    I also agree with @Lurking-Ninja that trying to use the animation system for everything is foolish. A good tweening system can give you a far better workflow for things like UI animations than a general purpose animation system and sometimes just writing a simple script to move something can save a lot of hassle later on.
     
    FaffyWaffles likes this.
  4. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    674
    one mistake I made was using GravityWeight curves on animations. don't remember what exactly was the issue, probably blendtree blending, but later on gave me quite a task to remove all those curves.

    also used footposition curves on animations. better to calculate in code those too.
     
    FaffyWaffles likes this.