- Home /
How to create a gradient progress bar
Hi friends,
I want to draw a progress bar like this
I wrote code, but the effect is not gradient fill based on value. Its a solid color based on the value.
Can you please help me?
I don't understand what you are trying to achieve nor what your problem actually is.
This bar should be animated? you want to display one bar at a time? should it be a sprite and working within the unity 4.6 UI system?
you have issues with the colors? If you wrote code show us where you are stuck :p
regards
Edit : If it was a gradient like this
I have a very simple solution, for any use.
Answer by kumarc123 · Apr 08, 2015 at 10:49 AM
I solved this problem.
In Unity 4.6 GUI, also in NGUI you can select sprite type as Filled and Fill mode to radial with you desired fill direction.
That was my solution for the gradient alone yep. Well done for figuring it out :p
Answer by ForeignGod · Apr 08, 2015 at 09:54 AM
http://answers.unity3d.com/questions/14770/creating-a-circular-progressbar-timer.html
Take a look at this answer and look on how the alpha gradients are used. Its very usefull for this kind of progressbar.
Simply hide the rainbow texure behind your alpha gradient texture and change its alpha value with a script. This way the alpha texture will fade with the gradient and reveal your rainbow bar.
More details are in the answer above.
Answer by vetasoft · Aug 04, 2015 at 08:28 PM
https://www.assetstore.unity3d.com/en/#!/content/42566
Check out this asset, you can easily manipulate your gradient sprite alt text