Creating Health Bars using Unity GUI Textures

blog post header image

Technical talk from Matt Bauer about Unity creating scaling health bars in Nauticus Act III, the RTS style conclusion to Nauticus.

In this tutorial, I take you through the steps to create health bars in Unity. They scale in size based on the camera's position, and they will also change color from green to red.

We will build them using Unity's GUI textures which are ideal for this type of application. While we're applying them in an RTS style game with an overhead camera, you should be able to implement something similar in your game no matter the genre.

If you have any questions about this tutorial or others I have posted, leave us a comment on the Youtube video.

Recommended posts

We have similar articles. Keep reading!

blog post preview image
solo-play

How to Create Random Tables

This guide walks you through creating custom Random Table Generators, from setting up a Generator and organizing its contents to building your first Random Table and filling it with entries. You’ll learn what each section of the editor does, how privacy and search metadata work, how to link tables together for layered results, and how to speed up setup with pasted entries or assisted generation.