Home > Mobile >  Unity - healthbar as outlined line around the screen
Unity - healthbar as outlined line around the screen

Time:11-17

I have a game in Unity. The idea of the game is that an object is spawned on the screen. It exists for several seconds. You need to click on it, while it exists.

What I want to do, is that while it exists - I want to show a timer, but not with numbers, but with an outlined line on the perimeter of the screen.

I know, how to make a make a slider and how to make circular health bar, yet I do not really have an idea to make a slider, that is decresing from everywhere to the centre as you can see on the screenshots below.

I would be thankful for the inspiration!



enter image description here

enter image description here

enter image description here

CodePudding user response:

This should be a very good fit using alpha cutoff with a custom shader.

Here's a enter image description here

  • Related