I am new to programming and Unity3D. I want to show a circular progress bar starting invisible and growing in 3 seconds to a circular line when reloading is done. How can I do that?
1 Answer
\$\begingroup\$
\$\endgroup\$
7
GameObject->UI->Image
Put your unfilled circle outline sprite in image.
Change the Image type to Filled. Then you can play with Fill amount property and also control in through code.
Some credit goes to Shubham who I copied from instructions on a slightly different subject.
-
\$\begingroup\$ I don't think this is what the OP was after, if I understand you correctly this would create a circle that slowly expands. I believe the OP was after just the outline of a circle (i.e. non-filled). Also, this lacks an explanation of how to link the animation to the loading progress. \$\endgroup\$– AlexCommented Apr 29, 2015 at 7:21
-
\$\begingroup\$ This can be easily done using a unfilled circle.... OP mentioned nothing about animation. \$\endgroup\$ Commented Apr 29, 2015 at 9:36
-
\$\begingroup\$ Sorry if I was wrong, but I assumed setting the sprite to 'fill' would result in a solid circle (rather than an outline). And by animation I was simply referring to "starting invisible and growing in 3 seconds" in the question. \$\endgroup\$– AlexCommented Apr 29, 2015 at 9:50
-
\$\begingroup\$ Try it one day, us programmers use it as an easy way to stay away from animation ;) Can be used for most things of this type. "Fill" is just the setting in Unity (There is also a fill center option for sliced sprites but that's seperate). \$\endgroup\$ Commented Apr 29, 2015 at 9:53
-
1\$\begingroup\$ Maybe you should mention that it's the RADIAL fill method which does the trick :) \$\endgroup\$ Commented Aug 27, 2015 at 21:35