Game Development Reference
In-Depth Information
Of note, the Sprites (as shown in the previous sheet) that we are most interested in at
this point are:
•
Slider_Top
: Position X 219, Y 35, W 293, H 35
•
Slider_Bottom
: Position X 219, Y 0, W 293, H 35
•
Slider_Bar_Top
: Position X 286, Y 360, W 226, H 13
•
Slider_Bar_Bottom
: Position X 286, Y 347, W 226, H 13
•
Backdrop_Light
: Position X 425, Y 163, W 78, H 62 - Border L 18, B 22,
R 19, T 7
•
Backdrop_Dark
: Position X 425, Y 242, W 78, H 62 - Border L 18, B 22,
R 19, T 7
•
HUD_Selected
: Position X 0, Y 184, W 108, H 85
•
HUD_UnSelected
: Position X 0, Y 271, W 108, H 85
Once you have these Sprites split and set up, we can continue building our
Screen
Space - Camera
UI.
If you are unsure about how to use the Unity 2D
Sprite Editor
,
then check out this short video tutorial on the Unity Learn portal:
A Screen Space - Camera health bar
Now let's move on to building our UI. For this example, we will build a simple
health chart for our fighter to track the shield and hull strength of our craft,
as shown in the following screenshot:
A top slider bar in blue for shields and a green bottom slider for health
Using our assets, let's throw this little gem together.