- Home /
Fill The Inside of a Prefab Circle in Unity 2D
I have a circle prefab that I've made out of a transparent PNG. The center of it is empty. I'd like to use it for a meter, that is to say have the inside fill up and down depending on the player's health.
Was thinking that if I could make a mask somehow then I could just draw a colored rectangle behind it and only let the center part show, but I am not sure how to do that. What would be a good was of accomplishing this?
You can use the new UI $$anonymous$$ask with the circle, then set an image that will go up or down according to the player's health. I don't know if it's the best solution but it will work.
Answer by Wisearn · Dec 30, 2014 at 06:06 PM
http://answers.unity3d.com/questions/14770/creating-a-circular-progressbar-timer.html
You can use this method, but it doesn't have to be like a timer like in the example. If you want more diablo style you can just use a sphere that goes from solid to transparent straight across.