while ive read your current free ebook ( which handles the improvement of ingame performance ) I came to a point where it says, developers tend to use animators extensively. Well why wouldnt they no where is another option shown for simple animations. At least i didnt see one.
So my question, for simple effects, which consist out of 1 animation file, how to get rid of the animator and the whole overhead ? I just want to update the sprite, maybe adjust some other variables like light size etc. and send an event at the end of the animation.
How can i do this via script and without too much overhead ? The most performant way ? Do i need to use legacy animations then ?
The “legacy” Animation component is by far the fastest way to play back animations in Unity. For playing a single clip, it very easily beats the Playables API. I’ve checked. It’s also the easiest way to play back animations, so I’d recommend you to use it @zh4r0naX
Playables uses an Animator, but without an Animator controller. It’s faster than the Animator+AnimatorController for doin anything, and you can build pretty good tools around it. You need to write a lot of boilerplate to play a single clip, but it’s easy enough to put that behind a tool.
Thank you for your suggestions, for more complex things i would stick to the animator. but for simple hitting effects etc i would love to get rid of the animator.
@Baste do you have any link for me where i can read into this with some sort of tutorial which you would recommend ?
How do I edit an Animation clip if I want to use Playables? The animation editor require me to have a controller to edit a clip. Do I have to create an unused controller for me to use the animation editor? Or there is a way for me to edit a clip directly?