HEALTHBAR in Unity - [Unity Tutorial]

preview_player
Показать описание
Create a healthbar for your player character in Unity. Bonus: I'll show you how to smoothly animate the remaining health to give it some cool points!

p.s Sorry about the crappy audio on this one!

=========

About Tarodev:
Develop video games like a pro!

0:00 Intro
0:09 Create the visuals
1:31 Writing the script
3:27 Always face camera / billboard effect
4:58 Animating the remaining health
Рекомендации по теме
Комментарии
Автор

YES I LOVE THAT. Short, no 3min intro and explaining what a boolean does, lot's of quality information and a good coding style. Appreciate it keep it up!

cbpjebg
Автор

This is one of the best tutorials I've ever seen. Great pace/speed of which you're explaining things and no unnecessary prolonging of the video till the 10:01 time. If teachers were paid appropriately, I could imagine you being one. Good thing YT recommended me you among the very first videos after searching for healthbars in Unity.

Thank you for not making me suffer through a 25 minutes long video with unnecessary gobbledygook.

yummy
Автор

instead of the bar looking at the camera which looks weird when the healthbar is not in the center of the screen. I just set the rotation of the healthbar to the rotation of the camera, this way its always perfectly horizontal and visible

wizzzle
Автор

If you can't apply your image as a sprite on the image ui. Simply do this, Click on your image. Look in the inspector view. Change the Texture type from 2D to Sprite (2D and UI). Images can't be added to the scene, sprites can be. Therefore, convert it to Sprite first.

knownmystic
Автор

The quality of your tutorials, both in the sense of how helpful they are and how visually/audibly impressive they are, is phenomenal. Keep making these high-quality tutorials and I've no doubt you'll become the next Brackeys. Great job! 👍

syngleton
Автор

Underrated channel, Unity should hire you to make tutorials for em, I swear. Your channel is Gold my guy

ebbcelent
Автор

if for the Image _healthBarSprite fill amount is not showing up, make sure at the top you put: Using UnityEngine.UI;

asmred
Автор

You could use Transform.LookAt(), was there a reason for preferring Quaternion.LookRotation() ?

HassaanALal
Автор

Where did you get the healthbar sprite from?

AquilaPebble
Автор

Thanks for this tutorial. Its so simple and nice looking helathbar!

imTroNic
Автор

solid tut, thanks, keep em coming solid!

adadventure
Автор

You deserve 100 thousand subscribers. When is the discord server coming?

noobcraft
Автор

Hello! I'm trying to use this with a UI panel and 3d object and it works fine with rotation as you said, but the panel changes form as i change X or Y coordinates. Do I need additional line of code to handle this?

karpuz
Автор

Hey there! Great tutorials. I've watched every single one of them and I swear, I've never put so many likes under any youtube channel. Thanks a lot for your work, hoping to see more advanced tutorials.
I have a question: is it really a good practice to create canvases in every single instance of your enemy or character? Or is there a better way to approach this when dealing with bigger amounts of healthbars/UI's?

ScrewYUguyS
Автор

Thanks for the nice tutorial! This canvas setup is super easy to use. What do you recommend for maximum # of canvases per scene? My scene could have as many as 30 units perhaps... Thank you again.

libiroli
Автор

Its just that this thing bugs me when i have to set a ' public camera cam' variable and manually chose a camera, how would i do it in a multiplayer game where there is no chance to manually selecting which cam to look at, or again in a scene where two cameras are looking at the health bar, what do i do then?

junnoonrafid
Автор

What is the advantage of using [serializedfield] private instead of public?

voxtelnismo
Автор

Hi. You assigned a canvas for the player. What if you have multipe players? Whould you end up with multiple canvases?

chrisheld
Автор

Any ideas why if i enable and disable the canvas of the healthbar, it also messes up the texts of other canvases text mesh pro texts on buttons and my inventory.? It only happens if i play the build of the game and not in editor.... It's unrelated to this specific video, I created a damage popup. I think it could be related to the strange Canvas(Environment) that has all settings greyed out these days in prefabs somehow :S

BNTO
Автор

How did u do the attacking and damage towards the placeholder

SomeUselessDud
welcome to shbcf.ru