Issue adding animated sprite to UI Button
At the moment I have a UI button with a pre-download sprite and a post-download sprite. The pre-download sprite is a simple loading graphic and the post-download sprite is loaded off of a server and replaces the loading graphic. Right now this works fine, but is there a way to animate the pre-download sprite? I want to have it spin while the server image downloads.
Answer by G-Reusch · Nov 18, 2016 at 11:28 PM
Best bet is to put an Animator component on the button and have it cycle between some sprite frames (or just change the rotation of the sprite if that would produce the same effect). You can tell the animator to play or stop when necessary, and you can research "Runtime Animator Controllers" if you want to experiment with swapping animations on the button.
Thanks for the response. It was just what I was looking for