I have a rounded rectangle progress bar that I would like to scale on the X axis but of course as I scale down the progress bar the rounded edges will become stretched out or squished.
How do I go about scaling the bar proportionately without having to make numerous progress bars? I’d like to scale the bar dynamically for the HP of various enemies.
Look into 9 slice, check the Setting Image States section here:
In short, margins of a 9 slice allow you to reserve a percentage of the edges that does not get scaled. If you leave enough breathing room for the margins, the image can be stretched without distortion: