Search Unity

Add Property to Animation Clip used in an Override Controller

Discussion in 'Animation' started by GoliathAT, Sep 23, 2021.

  1. GoliathAT

    GoliathAT

    Joined:
    Apr 12, 2014
    Posts:
    32
    My Animator has an "Interact" state. Its animation clip can be swapped via override controllers, so every interaction inserts its own animation clip.
    For some of these interaction animations I want to add a property to the clip managing the weight of an IK-Rig.
    Problem is, the animation clip has to be present in the animator in order for the "Add Property" button to be active.
    The reason for using override controllers has been to keep the different interaction animations out of the controller to keep it slick.

    Will I have to add every animation I want to do IK in parallel as a state to the animator of the object I want to animate? Or is there a way to keep the current abstraction with override controllers and still be able to add properties to an animation clip?
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    That could be a limitation of the authoring tools rather than a runtime system limitation. So you can probably just put the clip in your Animator Controller, add the property, then remove the clip and use it in an override controller.
     
    GoliathAT likes this.
  3. GoliathAT

    GoliathAT

    Joined:
    Apr 12, 2014
    Posts:
    32
    It works just like you said. The Clip needs an Object to get fields for properties. After adding them, they are stored on the animation asset and i can reuse them outside the animator. Thanks a lot! =)