Home > Enterprise >  Is it possible to play animation clips without an Animator in Unity?
Is it possible to play animation clips without an Animator in Unity?

Time:05-18

I'm looking into Unity animation functionality and am wondering if there's any way to work around the Animator system. Playing clips is fine, but Im looking to hold on certain keyframes in script and eventually attach data for selected keyframes. The animator feels too high level for this type for approach.

Are there any alternatives to the Animator system? I had a look around and saw mentions of Assimp and SimpleAnimation as external support, but they don't seem currently supported.

Thanks

CodePudding user response:

I ran a couple of tests and it looks like I can actually pause on certain frames via the following, without actually working directly on the animator

 _playable = AnimationPlayableUtilities.PlayClip(_animator, _clip, out var graph);

_playable.SetSpeed(0.0f);

[...]

// for a specific keyframe
            _playable.SetTime(_step * _clip.length);

CodePudding user response:

This question has already been answered in detail here. In this process, an empty object such as a cube is animated from scratch and moved. I hope the answer to your question is found in this post.

How to create animation clip via script in Unity?

  • Related