Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Animation job execution order

Discussion in 'Animation' started by Catzeromeio, May 4, 2023.

  1. Catzeromeio

    Catzeromeio

    Joined:
    Nov 18, 2016
    Posts:
    7
    I create two isolated playgraph with animation jobs, output to the same animator. How to control the animation job execution order? Is possible to control the execution order?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,455
    I haven't touched animation much. In code, you can add dependencies on another job(handle) to another job when scheduling. If this is not in the playgraph, it is possibly not possible to order them
     
  3. Catzeromeio

    Catzeromeio

    Joined:
    Nov 18, 2016
    Posts:
    7
    Thanks for your replay. There is no place to set dependencies for animation job handles in playgraph, I really don't know the point to use animation jobs because there some cases which will cause undetermined results, such as one graph modify bone1 and other graph modify bone2 with animation job( bone1 and bone2 in the same character)
     
  4. tsukimi

    tsukimi

    Joined:
    Dec 10, 2014
    Posts:
    53
    You can set Execution order of animation playablegraph (more prcesisely, AnimationPlayableOutput) by AnimationPlayableOutputExtensions.SetSortingOrder.
    You can also look into the Animation Rigging package, which is also a good example of processing animations.
     
  5. Catzeromeio

    Catzeromeio

    Joined:
    Nov 18, 2016
    Posts:
    7
    Thanks man. :D