Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Enter the 2020.2 Beta Sweepstakes for a chance to win an Oculus Quest 2.
    Dismiss Notice

Help Wanted Script Execution Order

Discussion in 'Animation Previews' started by Graham-B, Aug 28, 2020.

  1. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    277
    I'm trying to use Animation Rigging constraints alongside my Final IK FBBIK setup. I need to change the script execution order for them to play nice with each other.

    Whenever I add any of the Animation Rigging package scripts to the script execution order settings and then hit apply, they disappear from the list.

    Any ideas?
     
    Last edited: Aug 28, 2020
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    182
    Hi,

    The RigConstraint scripts are not executable scripts (they don't implement the Update function). This is probably why they are removed from the script execution manager.

    Instead, the RigBuilder gathers the constraints in the animatable hierarchy and builds a PlayableGraph that will be processed when animation is evaluated. You can't really execute other MonoBehaviours in between Animation Rigging constraints, but you can have scripts evaluate before Animation when `Update` is invoked, or after Animation when `LateUpdate` is invoked.
     
  3. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    277
    So Final IK in conjunction with Animation Rigging is a no go unless Final IK is modified to accommodate?

    Is there a way to implement full body biped IK with the Animation Rigging package currently?
     
    Last edited: Aug 29, 2020
  4. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    182
    Animation Rigging constraints are evaluated in Animation C# Jobs directly in the Animation pipeline, so using other scripts in between constraints is not possible. However, if they want, third party projects can implement custom constraints using what we provide in the Animation Rigging package API.

    Like I just said, you can implement your own custom constraints for Animation Rigging. Creating a Full Body IK within Animation Rigging is very much possible.

    You can have a look at the following Unity talk where we explain how to extend the Animation Rigging package:
     
unityunity