- Home /
Question by
Polyternity · Sep 15, 2019 at 11:34 AM ·
animationuidestroytransitionsautomation
Automating transition animations through script
Basically the question is: Is there a way to automate animation creation via code?
I've been making UI transition screens, and I caught myself doing the same routine every time:
Making UI screen prefab
Adding Animator component
Creating Animator Controller and linking it to Animator
Creating fade in/fade out animations
Creating Show and Hide triggers
Setting transitions inside Animator
I just wonder if it is possible to have just one script with public fields like: fadeInAnimation, fadeOutAnimation, duration and it would create all needed stuff on Awake.
I'd appreciate if you could lead me in the right direction.
Comment