The only way I can think of doing this is to create 100 different images, each one representing 100% health, then 99%, 98% etc.
This would take me a very long time, and it will be very repetitive to create the 100 different images of the health bar at different levels, and then the script with a hundred different states to swap around the GUI Texture which is to be viewing how much health the player has.
Is there a more efficient way to set this up?
2 Answers
2The “best” way depends on how your healthbar looks like. The simplest way is just to scale your GUITexture. You can keep a background with no scale behind the scaled bar to have a better look.
I use custom shaders when I need to display gauges and meters. Of course, it all depends on how you actually intend to display them (icons, straight meters, circular gauges, numbers, etc.).
– Dreamblur