I upgraded my Unity installation today to 4.6. This version has some new and interesting support for putting UI elements in world space, so I figured I would leverage that and make my health bars look a bit nicer.
I added a health bar manager to handle decreasing the health and changing the health bar colors as health decreases. Here’s what the setup looks like in Unity:
You can snag the script from Hex’s GitHub (if you just want the health bar script, this is where you want to go).
As always, I’ve updated the deployed game, so if you want to see them in action, head on over to Hex.

