I’m currently using LeanTween for the new UI, and everything seems to be working very well. Here is example of code that I use to fade in a screen over 2 seconds.
We use DOTween so far. Not sure which of the two is better, but we decided to ditch unity native animation since it’s hard to use for small “transition-in” type of things. Especially if content is dynamically built.
This might come from the fact that we don’t know full power of it (or maybe how to use it at all), but after spending few looking for the solution that would allow us to maintain flexibility using unity animations on dynamic content - we failed.
@Levr01 Are you sure about the performance hit? Isn’t it because you start animating alpha values which causes the drop in the frame rate maybe? It is hard to believe that this little peace of math has such a big performance impact.
I remember that I also used DOTween in an old project.
Now I am using Easing Functions by C.J. Kimberlin combined with some self made animation logic.
I also rarely use Unity’s animations because it feels too complex for a small transition like fade or move in / out. I also have a system in my current project where everything (actually only UI Screens) is created through prefabs via code and the transitions between the screens are made with code, not with unities animations.
Some of the best optimization tips for Unity UI contains some useful advice. #7 is a reminder that Mecanim Animators dirty their elements every frame, even if they’re not doing anything. If performance is an issue, it may be better to use a custom tween/easing function like Hosnkobf or the legacy Animation component with a non-looping clip.