How to create a health bar similar to this, which has both shield and health in the same progress bar. If the player does not have a shield, the whole progress bar is covered by health and if the player has a shield the x% of the progress bar is taken over by the shield and rest y% belongs to health.
The Size variable dictates how much of the parent space the widget occupies. In this case, the blue one has been set to take 25%, the green takes 75%.
When the player loses the shield, set the green to 1.0 and hide the blue. If you use a progress bar for the health, you’ll have an option for the player to have a bit of health and a full shield, too.
I would just use the “overlay” option. Create 2 progress bars, health first then shield so shield is always drawn last and over the health bar. In the shield’s background style options, go to tint, set the alpha to 0. You now have 2 overlaid bars when the shield depletes it will reveal the health bar below. Each can be independently controlled with code/script to function however you like in your game.