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

Animator Controller Only Works for Single NPC, Same With Animator Override Controller

Discussion in 'Animation' started by cassius, Aug 28, 2020.

  1. cassius

    cassius

    Joined:
    Aug 5, 2012
    Posts:
    125
    I'm on Unity 2019.4.7

    I would like for my NPC characters to utilize the same Animator Controller for their movements. Setting it up for a single NPC works great. However once I've added the Animator, assigned the Animation Controller and specify the Avatar for the second NPC, neither of the NPCs work any more. All NPCs have the same bone structure. If I disable NPC-A, NPC-B works. If I disable NPC-B, NPC-A works. When both are enabled, neither work. They do, however, display the Idle animation. I have a Parameter set up for the Animator whose value gets changed at runtime. Perhaps this is why? The parameter determines the speed of motion, which Blend Tree then uses to blend the animations.

    I also tried to add an Animator Override Controller for the second NPC and the same thing - none of the NPCs animate beyond Idle, even with one using the regular controller and the other using the override controller.

    When multiple game objects use the same Animator Controller, do they share the same instance of the controller or something?

    Screen Shot 2020-08-28 at 12.54.57 AM (2).jpg

    I have referred to tutorials where they do exactly what I'm trying, and have followed along with videos on YouTube - again where they're doing the same thing. But it doesn't work for me.
     
  2. cassius

    cassius

    Joined:
    Aug 5, 2012
    Posts:
    125
    Okay, I did nothing but bake Lightmaps over night, got up this morning to check on that and now all my NPCs and Animator Controllers are working. Very strange!