I try to avoid animation!
But I have to program some simple single-animations on a gameObject and I do not see how you would do this without legacy animation.
Because if all you have is 1 non-bipedal animation clip that I want to play/pause, maybe reverse, maybe set its time value to scrub back & forwards if something special!! (do-able/done, if not as simple as expected…)
Also if you want to do a simple/fast/retro game, you probably do not want to mess with mecanim, at least while prototyping.
Is there anyway as simple as Legacy with Playables API, Mecanim etc?
Will legacy be kept?
Check out Animancer (link in my signature). It’s far more flexible than even the Legacy system and also has a Solo Animation component if literally all you want is to play and control one animation.
Also, last I heard, the official stance was that Legacy will not be removed unless a newer system can do everything better. I doubt they’ll actually keep maintaining it indefinitely, but I would expect a few more years at least.
I have probably already done what your solo animation component does - It seems pointless to use non-legacy for a simple mechanical animation as Playables seems complex
Is the rest of your plugin based around the Playables API underneath?
The Solo Animation component is useful for testing because you can control the animation directly in the Inspector, but it won’t really add much if you’re already using Legacy for that. The only thing I’ve actually used it for in a real project was some Humanoid background characters since I needed the ability to retarget the animation.
Animation and AnimationState seem to be flawed in that I can not get the current state of an animation without tracking it constantly/adding events etc.
An AnimationState will have its NormalizedTime reverted to 0 when an animation has finished, even if not a looping animation! So I can not determine the current state of an animated mesh - it could be paused at some point along an animation or at its end.
In Animancer (an the Playables API), time will keep increasing after the animation finishes, regardless of whether it’s looping or not. There are also other properties like IsPlaying and Weight that you can use to check whatever details you need.