Floating combat text - animation or code?

I’ve recently watched a number of tutorials on creating floating combat/damage text. I’ve seen it done with code (ie moving and fading away the text with transform and alpha changed in a while-loop) and by creating an animation.

My question is, which is likely to b the least resource intensive? I’m inclined to think that keep spawning an animation clip would be more work for system.

Animation will need a little bit more time to compute, the benefit of the cost is you can easily change the animation in the Editor to something more complex with curves, also it gives artists more freedom. I don’t think you’ll notice a difference in performance between animation and lerp unless you have alot of texts on screen. Code/Lerp will be slightly faster, but you’ll have less flexibility.