In that case, it would be even simpler. You can directly remove the Z-axis displacement in the Animation Window.
Furthermore, you should be trying to solve the issue of runtime playback speed, right? If so, you can use Animator or Playable to play the animation you created, as they both support setting the playback speed.
My purpose is not to control the playback speed when the game is running, but to control the playback speed when making key frame Animation through the Animation windows interface, so as to make animation more convenient.
I knew I could fix the speed in the Animator, but it didn’t feel elegant enough.
And I’m not sure if the Animation itself is slow (same number of keyframes, but with more frame intervals) in order to play slowly in unity Animation, adjust the playback speed in the Animator to make it play properly. Does this consume more performance than making animations directly at normal playback speed while the game is running?
I rarely use the Animation window, so I don’t have much knowledge about its functionality.
However, based on what I know:
The actual length of an AnimationClip during runtime will be displayed in its Inspector.
The playback speed property of the Animator during runtime is only used for calculating the animation’s deltaTime, so it shouldn’t cause any performance issues.