I want to make a healthbar like this:
image

I've noticed that in settings there are multiple options for background image etc. I tried building it using a GUIBox with custom skin in combination with HUD and Status Element. I however never achieved what you see in the picture and I find it extremely complicated to achieve such a simple thing.

I've been thinking of making a custom solution where I would execute my own function tied to the HPBar prefab in the Status change event, but I wanted to avoid making too many custom things. Any advice?

Later I want to achieve this for the player himself:
image
  • The GUI box is just a container (defining the bounds) for what you display, i.e. all the image stuff is usually handled by the HUD. If there's an overall background/foreground image for it, use it in the HUD's Image Settings. Otherwise, you can add backgrounds to each individual HUD element.

    For the value bars to fit into such an image, either already have the value bar as a complete image to fit it, or use an alpha mask to fit it to the background. Alternatively, if you have the image around the bar in the foreground, it'll hide stuff anyway :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.