Search Unity

Question Animation Override Controller Won't Play Given Clips

Discussion in 'Animation' started by rloft123, May 23, 2023.

  1. rloft123

    rloft123

    Joined:
    Feb 16, 2022
    Posts:
    4
    It seemed pretty straight forward at first, I create a base controller with the states/transitions I want, and with empty animation clips. Then, create the override controller specifically for my new NPC, add the animation clips I want for each of the states for that NPC, add that to the NPC's animator component, and then we're good.

    Issue is, it will never play those clips in the override controller and only ever go down to the base controller and use those empty ones no matter what I do. I tried naming everything to match, and even started from scratch multiple times. I'm pretty close to giving up and just laboriously creating a controller from scratch for each NPC I make, which will take hours.
     
  2. ArtSkott

    ArtSkott

    Joined:
    Apr 19, 2018
    Posts:
    13
    " with empty animation clips". I'm pretty sure you need base animations there for the override controller to work.

    For example if your base character should have something Like "Base_Character_Walk", "Base_Character_Idle" etc.


    Then in code you have something somewhere like

    Code (CSharp):
    1. animatorOverrideController["Base_Character_Idle"] = animations[0];
    2.         animatorOverrideController["Base_Character_Walk"] = animations[1];
    Could you link a screen shot of your animator set up?
     
  3. rloft123

    rloft123

    Joined:
    Feb 16, 2022
    Posts:
    4
    I mean that the base animation controller has empty clips, then the override uses that base controller and I drag in the clips into the corresponding Overrides.

    I have my NPC in a persistent scene, they have an Animator component and the controller points to the override controller. However, once the game starts all the overrides go to None (or whatever is in the base controller).
     

    Attached Files:

  4. rloft123

    rloft123

    Joined:
    Feb 16, 2022
    Posts:
    4