Playing an animation from a script

For what I’m trying to do, I just want to play a specific animation on command. I don’t need to have the animation blend and I don’t need to set up a network of states to dictate a flow; I just want to play a given animation clip. As such, I want to bypass using an animation controller and just drop an animation clip or two into a script in the inspector.

I recall setting sprite animations to play with a script command, but maybe I’m remembering wrong.
But right now I’m working with some animated 3D meshes, and things are a bit different from what I’m used to.
I’m not seeing an option within the animator to just play a given animation clip. I could play a state, but that would require me to set up a proper animation controller.

I do see a component I can add that’s just called “Animation” and it had the capacity to play an animation clip on command, but for some reason some of the character models I got from the asset store won’t work with this; I get an error saying that the given clip must be marked as Legacy, but I don’t see how to mark that within the animation.

You can also use the newer Playables API.

Or mark clips as legacy using the debug view.

Ah, that’s where the legacy check box is.
That sounds like the easier method, but what does marking an animation as legacy actually do?
I imagine it’s still the easier method since I don’t need anything complicated here, but it would be wise for me to understand what I’m doing when I do a thing.

Ahhg, I can’t actually change the animation to legacy. All the debug options are grayed out and I can’t change them.

If it’s built into the model, try duplicating the clip first.