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

Question Problem using AnimatorOverrideController when changing the base animation clip

Discussion in 'Animation' started by jiraphatK, Oct 27, 2022.

  1. jiraphatK

    jiraphatK

    Joined:
    Sep 29, 2018
    Posts:
    293
    So, our game has 2 characters.
    Male/female.
    The logic of controller is the same between these two, the only difference is the animation itself.

    I use AnimatorOverrideController for the female character to override the male animations. This worked fine at first but then the problem occurred when I changed the animation clip in the male animator (the base).
    The override clips I have assigned in the female override controller is gone if the new clip have different name. I have to re-assign the animations again.
    This is not a trivia task as my controller has hundreds of animation clips and it takes time to sift through to find which I should re assign. During our development we often change the animation frequently to apply adjustment and test out idea and I'm struggling to find out why the system is designed this way? Why can't it be override by state name as that is unlikely to change compared to the source animation itself. And this is just one override controller, imagine using this system and have 10+ override controller and you have to reassign all the missing clip. ‍♂️

    I'm looking for a solution to this problem. If anyone had ever been in the exact same situation, how did you deal with it?

    The only solutions I have come up with are making sure the assigned animation has the same name as the old one but this is also painful and weird way to work. If anyone has a better solution pls help!