The main difference between a Player's Health Bar in the HUD vs an Enemy's is creating the Health Bar in WORLD SPACE. In stead of overlaying UI on the Camera, the Enemy or Game Object itself has a Canvas attached to it as a child object, and the UI is a part of the Enemy GameObject. The benefit of this is the Health Bar follows the Enemy around, the downside is we need to make sure it stays oriented and positioned properly as it does. Learn all about how to solve for that easily here without needing a single asset of your own. Using Unity's Slider UI component out of the box we can use the guts of that to make a working health bar in close to 5 lines of code.

bmounitytutorialunity tutorialenemy health barhealth barunity enemy health barworld space health barunity world space health barhow to make an enemy health barhealthbarbmo unity tutorial2d health bar3d health bar2d game3d gameunity 3d tutorialunity 2d tutorialunity easy health barunity health bar tutorialunity enemy health bar tutorialunity 3d health barunity 2d health barbeginner tutorialc#