Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

DOTS - Playing different animation clips with burst/jobs?

Discussion in 'DOTS Animation' started by thelebaron, Nov 6, 2020.

  1. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    851
    How do you play a different animation clip in a performant manner?

    Obviously one can play a specific clip like
    m_GraphSystem.Set.SendMessage(state.ClipPlayerNode, ClipPlayerNode.SimulationPorts.Clip, animation.Clip);

    but how does one do this from burst jobs? The above code seems costly in terms of performance with some very unscientific profiling and I didnt really see any examples outside of clip blending, though that seems like something more suited to the examples it showcased such as blending directions or speed, not completely different animations like going from walking to a death animation.
    I hope that theres some sort of faster path towards doing this vs mainthread without burst?
     
    elJoel and nicolasgramlich like this.