How to make a HEALTH BAR in Unity!

  Рет қаралды 1,147,433

Brackeys

Brackeys

Күн бұрын

Let's create a simple health bar using the Unity UI-system!
Get up to 91% OFF yearly Hostinger Plans: hostinger.com/brackeys/
Code: "BRACKEYS"
● Brackeys Game Jam: itch.io/jam/brackeys-3
● Project Files: github.com/Brackeys/Health-Bar
····················································································
❤️ Donate: www.paypal.com/donate/?hosted...
► Join Discord: / discord
● Website: brackeys.com/
● Twitter: / brackeystweet
● Instagram: / brackeysteam
········································­­·······································­·­····
► All content by Brackeys is 100% free. We believe that education should be available for everyone.
❤️ Donate: www.paypal.com/donate/?hosted...
········································­­·······································­·­····
♪ "ES_Dress Code_Black - oomiee" by Epidemic Sound

Пікірлер: 1 400
@Danidev
@Danidev 4 жыл бұрын
Top 10 intros
@TrimorphMC
@TrimorphMC 4 жыл бұрын
Hey Dani big fna
@uwaisqarni5676
@uwaisqarni5676 4 жыл бұрын
Hi dani boy
@KashTheGamerYT
@KashTheGamerYT 4 жыл бұрын
hi dani
@alexanderspencer14
@alexanderspencer14 4 жыл бұрын
Dani love your vids . Can you upload more?
@uwaisqarni5676
@uwaisqarni5676 4 жыл бұрын
Hey Dani, could you make a tutorial on 2d ragdolls and the movement cause I can't find any other tutorial that isn't garbage.
@raymond-exe
@raymond-exe 4 жыл бұрын
His sense of humor is questionable. And it's perfect for a developer
@Nickgowans
@Nickgowans 4 жыл бұрын
Jobs done!
@babanizprolar9727
@babanizprolar9727 3 жыл бұрын
Yup
@CabVideoz
@CabVideoz 3 жыл бұрын
LOL hilarious devs are not to be trusted
@yourm8markas
@yourm8markas 3 жыл бұрын
Brackeys in 2014: sounds really tired Brackeys in 2020: sound like the most energized man alive
@datarioniboii3986
@datarioniboii3986 3 жыл бұрын
He is aging, just backwards
@hackerulroman
@hackerulroman 3 жыл бұрын
because of quarantine
@yourm8markas
@yourm8markas 3 жыл бұрын
GamerulRoman what bout 2019
@yourm8markas
@yourm8markas 3 жыл бұрын
datarioniboii y
@yourm8markas
@yourm8markas 3 жыл бұрын
datarioniboii interesting
@Yoshi_green
@Yoshi_green 4 жыл бұрын
2:06 (a game jam) is a great way to challenge yourself in a stress-free environment ??? am i doing game jams wrong ?_?
@cohenschellenberg3325
@cohenschellenberg3325 4 жыл бұрын
lol
@Creere
@Creere 4 жыл бұрын
the environment might be stress-free but not you! :D
@JarmamStuff
@JarmamStuff 4 жыл бұрын
Ill let *you* decide... ... but the answer is yes xD
@wolfyanimations5078
@wolfyanimations5078 4 жыл бұрын
O_O
@blubobbie
@blubobbie 4 жыл бұрын
yes.
@riverofcustard5027
@riverofcustard5027 3 жыл бұрын
I will miss Brackeys, I hope you come back someday, you magnificent beast.
@kalpnamishra7424
@kalpnamishra7424 3 жыл бұрын
🥺
@sillicon8227
@sillicon8227 3 жыл бұрын
Why u saying "beast" lol
@ECSOrder66
@ECSOrder66 2 жыл бұрын
@@sillicon8227 4 months late
@bastiaantheboss4976
@bastiaantheboss4976 2 жыл бұрын
@@ECSOrder66 2 months late
@ECSOrder66
@ECSOrder66 2 жыл бұрын
@@bastiaantheboss4976 3 days late
@Gredran
@Gredran 3 жыл бұрын
One of the best intros, I love how you used examples from other games to show that this basic code and setup is basically used in EVERYTHING, just animated, drawn, and colored differently!
@doggopoggo5552
@doggopoggo5552 3 жыл бұрын
Thank you brackeys! You have left us but your knowledge and wisdom we will never forget thank you for inspiring and teaching a generation of game devs and teaching them the code the basic some intermediate and complex stuff as well
@AndrasMy
@AndrasMy 2 жыл бұрын
Thank you so much Brackeys, I looked at other tutorials for over an hour before coming to yours and always ended up confused but you made everything simple and easy to integrate. Thanks so much.
@kameramanzaspal9821
@kameramanzaspal9821 4 жыл бұрын
Even when I know how to make a proper health bar, this taught me so much for example the gradient. I wanted to make something like this with coloring sprite under void update but this is so much comfortable. Also the billboard script is so useful. Really good tutorial
@xDTHECHEMISTx
@xDTHECHEMISTx 2 жыл бұрын
Perfect tutorial i needed for my health bar to work. got it to work fine. Now im gonna search your playlist to see if i find anything on enemy interaction that effects the health when my character gets hurt
@braxtonsdev9564
@braxtonsdev9564 4 жыл бұрын
Yes!! I can't wait for the game jam, I had a blast during the last one😆
@KrazyKain
@KrazyKain 3 жыл бұрын
Thanks for this! I'm surprised by how simple and easy to use the Slider is. Also the Canvas world space stuff is super useful!
@ViniciusMNunes2
@ViniciusMNunes2 4 жыл бұрын
always releasing tutorials when I most need them
@codinginflow
@codinginflow 2 жыл бұрын
You can also set the Image Type to "Filled" and set the progress there. This also allows for example round shapes, circles, etc.
@SweetVibesOfficialMusic
@SweetVibesOfficialMusic 2 жыл бұрын
oh u here!xd
@codinginflow
@codinginflow 2 жыл бұрын
@@SweetVibesOfficialMusic you here too!
@InvisaPotion
@InvisaPotion 2 жыл бұрын
holaaaa
@alirezaizadparast5443
@alirezaizadparast5443 2 жыл бұрын
Yes that was a better way...i wonder why he won't do that..just its not seem sense to me we have a canvas in each character
@thediamondleaf5111
@thediamondleaf5111 4 ай бұрын
OMG My Idol
@SHDGames
@SHDGames 3 жыл бұрын
The amount of stuff I have learned and actually used in my games from Brackeys is insanity !!
@tenaciousstudios03051
@tenaciousstudios03051 4 жыл бұрын
Thanks for your help, Brackeys! Because of you, I'm slowly becoming a mildly impressive game designer!
@matama9053
@matama9053 4 жыл бұрын
Hey Brackeys I just love this kind of videos where we can reuse this thing in all our own games ( like the menus videos, awesome) PLZ make more of this, great content thanks
@webdevolop5476
@webdevolop5476 4 жыл бұрын
hi, i think this video is really worth it :)
@toucannfroot9107
@toucannfroot9107 3 жыл бұрын
that's great, but even something as simply as copying the code from his screen word-for-word is a great learning experience, and helps you understand the code you're using more. Just, unless you're in a rush, try not to copy/paste!
@assi3147
@assi3147 3 жыл бұрын
69 nice
@mrbananaman8032
@mrbananaman8032 3 жыл бұрын
Great tutorial that hit on all the dangling questions I had when watching other tutorials. You seem to know exactly what a noob would ask about. There were two things I had to figure out though... one was how to stop the HealthBar from rotating around the parent object when it rotates, and then how to get the ui to show over the player and enemies.
@pikachiu6345
@pikachiu6345 2 жыл бұрын
and how did you do it?
@evanwallace1949
@evanwallace1949 4 жыл бұрын
Fair play Mr. Brackey. Staying up to all times of the night to show us valuable skills. Really recommend this mad man.
@OfficialGooseGames
@OfficialGooseGames Жыл бұрын
Having the project files is a life saver!
@Rodri-gv8uf
@Rodri-gv8uf 4 жыл бұрын
Your ability to speak and smile at the same time amazes me!
@lethn2929
@lethn2929 2 жыл бұрын
Fascinating! I came back to this tutorial because I wanted to double check how to make a neat healthbar and if anyone is following this tutorial in 2022 and wondering why they're encountering strange squashed and stretching issues despite following everything it's probably because you didn't change the image type and brackey's doesn't seem to need to do this in this version of Unity. For a horizontal bar, change the image type from simple to fill, then left to right for the direction, that should fix the behaviour, if you have the fill image connected to the slider component then the value in the image will be disabled and it will give you a notice that it's connected to the slider component.
@randomakatsukipr4570
@randomakatsukipr4570 2 жыл бұрын
Did you run into any problems with the gradient? Every time I try to click on it, the hub for the gradient does not appear. Can anyone help with this?
@lethn2929
@lethn2929 2 жыл бұрын
@@randomakatsukipr4570 Have you double checked that you've declared everything properly in the code? I'll need to check because I don't use those kinds of components often but they may have changed it again.
@mumr1ken
@mumr1ken 2 жыл бұрын
Hey! Where do I change the image type "from simple to fill"? Cant find it in my settings
@cemtheone
@cemtheone 3 ай бұрын
@@mumr1ken Hello! I know this is too late but if you still did not found it and just rolled with how it is , here is the fix: You just need to add a source image! You can open your preffered photo editor and create a blank white png. Then you add it and you can choose image type afterwards.
@thelonelyguy1742
@thelonelyguy1742 4 жыл бұрын
Hey man , I only want to say THANKS for everything , you are helping me a lot
@thedeathlycow
@thedeathlycow 4 жыл бұрын
thanks man your videos have been a really big help with my tight deadline uni project
@sirbill_greebi3811
@sirbill_greebi3811 3 жыл бұрын
When I saw that he was working with a rotating camera, all I thought was "that's quirky." Now I understand
@sipo9333
@sipo9333 4 жыл бұрын
Brackeys thank you for making us these decent quality vides, I hope to see you guys grow as a company/team whichever is correct. Your tutorials always gets me going in the right direction, cheers for that! Have a nice day :)
@unitynoob4437
@unitynoob4437 3 жыл бұрын
Well....
@j.isasi_
@j.isasi_ Жыл бұрын
This tutorial is VERY helpful. Thank you for your amazing content!
@LFPaiser
@LFPaiser 4 жыл бұрын
Man it's so good to see that the health bar is done but still we have half of the video with more content on the various options and settings we have to implement that in the game. Great video!
@cameronsanchez2204
@cameronsanchez2204 4 жыл бұрын
I've only been learning coding for about like 3-4 days and this coding is already starting to look easy to understand.
@TornadoPro2712
@TornadoPro2712 Жыл бұрын
That's good, when i started coding i had no idea what i was doing until about 2 weeks later.
@rc3043
@rc3043 4 жыл бұрын
Really nice tutorial here are some notes for others: To reduce "random" problems set your currenthealth = maxhealth in awake() not start(). That way if you do check stuff with help in the update function there will never be "random" problems with it. Also takeDamage function should never reduce below zero! Catch that as well with a simple if(currenthealth < 0) currenthealth = 0; This could result in UI problems otherwise. The render with the UI on world is happening because you scaled down the canvas to 0.01 i think. If you just lower the width and height and then scale it to like 0.2 it will be more crips i guess :)
@martinboros9516
@martinboros9516 Жыл бұрын
Thank you very much
@GrimBirthday
@GrimBirthday 4 жыл бұрын
Dude holy cow I was just searching this up today and I was following your tutorial for movement in a fps game and wanted a health bar yaay
@LandonHughes2
@LandonHughes2 4 жыл бұрын
You are SO close to 1 million subs! Congrats man! I've been here since your early Unity tutorial days :P
@zerogaminghq5430
@zerogaminghq5430 4 жыл бұрын
Dude yesterday I was searching on KZbin about health bars what a coincidence!
@XPLexi_
@XPLexi_ 2 жыл бұрын
Google tracks your searches and history to reccomend videos
@b1llspc
@b1llspc Жыл бұрын
If anyone else has the issue of the images in a canvas not showing up, try scaling the size of your sprites and backgrounds up to match the huge size of the canvas! It turns out the Unity canvas cannot render past a certain point of smallness. I didn't realize my images and background sprites were so small! Hope this helps the next person who's wondering why their health bar seems to be invisible XD
@jake_mouse
@jake_mouse 2 жыл бұрын
Exactly what I was looking for, thank you!
@TheCodesnippet
@TheCodesnippet 4 жыл бұрын
Wow, super high quality tutorial... I would watch brackeys tuts endless....thanks so much, I hope to give you back one day what you learn us every week.
@tovvaar
@tovvaar 4 жыл бұрын
This is the first tuto I can follow entirely.
@TechRodent
@TechRodent 4 жыл бұрын
Hey Brackeys, Great video, very informative, and I definitely learnt an extra thing or two. Using render scaling to fix that issue might not be the best idea though, especially in terms of performance as it also renders everything in the game at a much higher resolution and may lead to lower FPS. What I've been doing in my game is a bit more complicated, but I'm using a Screen Space Overlay Canvas setup, and then using WorldToScreenSpace on the game object , and then using a vector 2 variable of canvas.sizeDelta / (camera. pixelWidth, pixelHeight) to multiply that with. Anchor your UI element to the bottom left of the canvas, and it should work perfectly fine. not sure if that's a better way to do things, but I feel it's better than increasing the render scale
@rambii.
@rambii. 4 жыл бұрын
I’ve been using sprites for my health bars so I can use different hp designs then tie the health value to the fillamount and it works well
@yeeman1135
@yeeman1135 2 жыл бұрын
Awesome Videos !!!! For someone, who has to hear everything twice, he is the perfect Teacher! BTW now you have to write Health instead of HealthBar ;) THANK YOU FOR ALL THE VIDEOS U MADE!
@Ekwadonk
@Ekwadonk 4 жыл бұрын
Hey Brackey! Thanks for the tutorial, i was blocked with the health bar, but can you one day make a tutorial for a top-down dungeon game ? that would be awessome
@zok_6619
@zok_6619 3 жыл бұрын
Is it just me is this health bar looking kinda *THICC*
@aaravagrawal8799
@aaravagrawal8799 2 жыл бұрын
My plan is to mix a lot of tutorials into creating my 'own' fps shooter game so I can show off to my friends. Thank you Brackeys
@possumridgeentertainment4614
@possumridgeentertainment4614 4 жыл бұрын
I'm kicking myself now. I made a health bar a couple of months ago and figured out the gradient thing on my own, but I went through this whole complicated thing of scaling the health down to the 0 - 1 range (health/maxHealth) so it would work with the fill settings along with all sorts of masking tricks. I never thought of using a slider, and I didn't realize the slider min and max could be set. If you would have made this video sometime last year it would have saved me a bunch of complexicated calculationing.
@ZenithAMVs
@ZenithAMVs 2 жыл бұрын
If you're using Unity 2D and every time you make your character look the other direction your health bar inverts and moves to the other side, just move your canvas so it's under the Main Camera, instead of your character. This means if your camera moves, the health bar moves with it, so it'll stay in the same position.
@pikachiu6345
@pikachiu6345 2 жыл бұрын
not such a good idea if your character moves and the camera doesn't :/
@xoomzera2830
@xoomzera2830 11 ай бұрын
just make the canvas above the transform of the player no need to attach it to the player itself
@Maggiethegsd
@Maggiethegsd 3 жыл бұрын
I needed this tutorial, and I noticed it was posted exactly 1 year ago from now (today is feb 10 2021). RIP BRACKEYS WE MISS YOU!
@Ponja__
@Ponja__ 3 жыл бұрын
Such a useful channel. Thanks for making these videos!
@Kalahee
@Kalahee 3 жыл бұрын
Honestly, instead of setting maxValue of the slider, I use ratio currentHealth/maxHealth. This way you can also use unconventional meters, like a Heart shaped meter that fill in Radial 360, or an apple slice in Radial 180, or your meter is a quarter circle in a corner then you can use Radial 90.
@Tantandev
@Tantandev 4 жыл бұрын
0:44 That's a mod from WC3 called Winter Maul Wars. Is there a WmW fan at Brackeys? :D
@greensmall4086
@greensmall4086 4 жыл бұрын
Its my holiday now and the jam is next week.
@ruchikarai3542
@ruchikarai3542 4 жыл бұрын
Which jam?
@ruchikarai3542
@ruchikarai3542 4 жыл бұрын
@Kommen Tiere wenn ich kommentiere ? Thanks
@greensmall4086
@greensmall4086 4 жыл бұрын
@@ruchikarai3542 Brackeys jam
@fs1_isme
@fs1_isme 4 жыл бұрын
Your channel is very inspiring and your tutorials are easy to understand than any other, keep making such videos regarding different aspects of unity, i"ll support always.
@GeniusK
@GeniusK 4 жыл бұрын
OMG! you added it when i want it 😍 thank you
@maddened3746
@maddened3746 3 жыл бұрын
what about when you have multiple enemy objects and want to display their HP bars simultaneously ... (like in warcraft) .... will we have to make and adjust canvas for each of those objects?
@CamoB-ub9my
@CamoB-ub9my 4 жыл бұрын
this is really useful and all but how do i make it go down when the hitbox connects with another hitbox with an 'enemy' tag? im very new to programming and still using videos for everything.
@smudged4090
@smudged4090 3 жыл бұрын
This was really useful! Thanks for making this video :D
@gamedevel22
@gamedevel22 4 жыл бұрын
I was using the UI image fillamount and scripted the life system with numbers from 0 to 1 which are the values of the fillamount! This slider option makes it much easier with the max and min values! Didn't know about that! Definitely using this next time.
@sxes
@sxes 4 жыл бұрын
Finally a Health Bar tutorial
@m.r3052
@m.r3052 4 жыл бұрын
Kalpact right
@DeathGOD7
@DeathGOD7 4 жыл бұрын
Code monkey had done it before FYI, if you had searched in YT or google
@m.r3052
@m.r3052 4 жыл бұрын
David Lad r/woooosh
@aquaarmour4924
@aquaarmour4924 4 жыл бұрын
@@DeathGOD7 ngl, codemonkey is much better than brackey, clean code, advanced topics and variety of content. I miss old brackeys. Now he just does beginner stuff.
@Terror1046
@Terror1046 4 жыл бұрын
There are much better ones out there.
@patricio1205
@patricio1205 4 жыл бұрын
I have a problem, the health bar works perfect with an enemy, but when I create another type of enemy and copy the health bar and of course change the life points of the newest, the new bar never moves when the enemy takes any damage. Only works with the original, the enemy even dies when health reach 0, but the health bar never moves.
@davidudodong807
@davidudodong807 2 жыл бұрын
dang, im watching this cause im making a game for a shcool project, and i wouldda been screwed if it werent fo good ol' brackeys. God bless ya, man
@OmeedNOuhadi
@OmeedNOuhadi 2 жыл бұрын
Oh my gosh guys, a simple thank you would have worked. Funny you have to make corrections in his comment sections and not on your own videos. Thank you so much. I can't believe I just watched a 20 minute video on how to have a health bar, but thank you so much for continuing to add to it until it looked perfect.
@wewemaster197
@wewemaster197 4 жыл бұрын
Can u do like a Tile Turnip effect,from Pvz 2,like when u meet a special requirement,2 or more things on a special floor will activate
@vegitoblue2187
@vegitoblue2187 4 жыл бұрын
Use booleans for conditions in a manager script . Make another script for the floor and write whatever you want to happen in a function there. Make an array of the floor class object and assign it's values in the inspector. If conditions meet call the functions in each array element
@wewemaster197
@wewemaster197 4 жыл бұрын
@@vegitoblue2187 true,but i want to see how brackeys do it :)
@CodedXtreme
@CodedXtreme 4 жыл бұрын
0:00 Worst best joke
@its_homayoun
@its_homayoun 8 ай бұрын
the god of unity Thank you for everything you've given us , your videos are helping me to become a good game maker I really thank you for that
@HC-pw5du
@HC-pw5du 8 ай бұрын
really practicle skill, thanks!
@fightinggamescombos6820
@fightinggamescombos6820 4 жыл бұрын
Hey how about a 2d fighting game collision tutorial? That would be great
@strahii2075
@strahii2075 3 жыл бұрын
When I learn C# Im going to start my own tutorials :D
@joechristo2
@joechristo2 3 жыл бұрын
Kretencuga Neve give up!
@astickman2486
@astickman2486 3 жыл бұрын
Good luck :D
@rodolfoc.nascimento6301
@rodolfoc.nascimento6301 3 жыл бұрын
Excelent man! Tha's I was looking for, great!
@user-qc5hd6ih7q
@user-qc5hd6ih7q 4 жыл бұрын
Thank U So Much And I hope That I Will Have Enough Time To Participate In The Jam
@Vendaar
@Vendaar 3 жыл бұрын
10:17 I cant drag the Health bar object into the the slot of the playerscript. just shows the sign that its not possible, any clues? :( edit: fixed it. i forgot to add the HealthBar script to the Health bar object first :) thanks for the tut!
@aidenhurley5074
@aidenhurley5074 3 жыл бұрын
I have the same issue and I'm not sure how to fix it, I checked and everything's where it's supposed to be...I think
@ThreepwoodForest
@ThreepwoodForest 3 жыл бұрын
This works fine and when i hit space it reduces health value each time. However also in play mode i can't actually see the healthbar, icon or border at all. It only appears and works just as shown in edit mode.
@mitchellaustin8894
@mitchellaustin8894 2 жыл бұрын
Check the z value in the transform.
@venjaminffxi
@venjaminffxi 2 жыл бұрын
worked as described , thanks man
@sakisgrig
@sakisgrig 4 жыл бұрын
Another way to position the health bar on the player would be to use just one canvas for all health bars. The canvas should be in "Screen Space - Camera" mode with about 0.01 scale. In this way, the health bar will always face the camera. You just need a script to update the position of the health bar to the desired one in world space. Benefits: - Only one canvas for the health bars, independent from the player object. - Easy to control all health bars. - No need to rotate health bars.
@DeathGOD7
@DeathGOD7 4 жыл бұрын
16 min late.....Yay..What wanted in my FPS Game
@theretrogamedev9188
@theretrogamedev9188 2 жыл бұрын
I'm making a 2D game and instead of pressing the space bar, if you want to take damage when you touch an enemy do, void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Enemy")) { TakeDamage(20); } } Then create a tag for the enemy called "Enemy" and it should work. If you want to do this in 3D just remove the 2D from OnTriggerEnter2D and (Collider2D other)
@bigchungusonline4773
@bigchungusonline4773 2 жыл бұрын
do i need to give them collider and do I need to do other stuff?
@kimzamusic
@kimzamusic 2 жыл бұрын
THANKS!!!! i was trying to do this for like 3 hours lol
@graptik8
@graptik8 2 жыл бұрын
Oh my god you're a fucking legend. Was looking everywhere for how to do this. Why the hell didn't he just include it in the video???
@guilhermeferreira5316
@guilhermeferreira5316 2 жыл бұрын
I'm probably dumb, but u man, i have no words, i have no fucking words for what u have saved my ass, i love you with all my heart
@alphablender
@alphablender 2 жыл бұрын
You just fixed my health bar problem, thanks a lot for your video
@ez4novi
@ez4novi 4 жыл бұрын
I was about to create this healthbar tut for unity, with a fluid effect. ;)
@ktz2625
@ktz2625 3 жыл бұрын
"I have achieved comedy"
@Oxmond
@Oxmond 4 жыл бұрын
When my health points are low 🤕 I just watch a Brackeys Tutorial! 💊😃👍
@ashulman1931
@ashulman1931 3 жыл бұрын
True
@holmbergen
@holmbergen 4 жыл бұрын
Didn't know about the gradient field, that's an awesome feature!
@TheRealKaiProton
@TheRealKaiProton 4 жыл бұрын
That Was Really Helpful, Ive watched a couple of Healthbar Tutors and its always been confusing when trying to Stick it to the HUD, well, at least for me..
@astercaster9522
@astercaster9522 2 жыл бұрын
alright, got the health bar, but how do I take damage when an enemy attacks instead of when pressing a button? been having trouble with that aspect.
@Keksboi2
@Keksboi2 Жыл бұрын
kzbin.info/www/bejne/innRmqmvfJWArNE watch at 5 : 25 he explains how to damage or TakeDamage you can ofcourse use the same script on your player too
@LorenZo-ix7lp
@LorenZo-ix7lp Жыл бұрын
why cant i see the reply
@BishalKhan01
@BishalKhan01 4 жыл бұрын
Hey Brackeys, Assuming you have been with contact Dani (found out from his Discord server) it would be a very funny and entertaining video for you and Dani to do a collab or a project together. Just saying, not forcing you to.
@cohenschellenberg3325
@cohenschellenberg3325 4 жыл бұрын
also everytime he needs to figure out something he looks for one of your tutorials, XD
@BishalKhan01
@BishalKhan01 4 жыл бұрын
@@cohenschellenberg3325 what do you mean?
@cohenschellenberg3325
@cohenschellenberg3325 4 жыл бұрын
@@BishalKhan01 look at anyone of dani's tutorials. Lets say he doesn't know how to make an fps controller, (as shown in his first 3d game video) he would look up a Brakeys how to
@BishalKhan01
@BishalKhan01 4 жыл бұрын
@@cohenschellenberg3325 oh yeah true
@st1gaming277
@st1gaming277 4 жыл бұрын
Thanks for this tutorial! Its gonna help me out alot
@bubbledev4004
@bubbledev4004 4 жыл бұрын
omg i was just trying to do that when you uploaded
@jacobbellet401
@jacobbellet401 4 жыл бұрын
Me still using unity 2018 seeing 2019 ui for the first time: WHAT IS THIS WITCHCRAFT!
@TragicSpider
@TragicSpider 4 жыл бұрын
please do diablo style grid based inventory where some items take up multiple cells and can be rotated
@computertech3986
@computertech3986 4 жыл бұрын
I found this from a quick search: kzbin.info/www/bejne/b6ndkJ6Pf7-SsNk Don't know how useful it'll be for you but there ya go
@HallyVee
@HallyVee 4 жыл бұрын
You'd get mouse cords when over pack ui element, get item backdrop data (just use xy) then start from mouse point - 1/2xy offsets to center item and set each pack square as potentially occupied. If all squares underneath unoccupied place item.
@Junior.Store.Google.Play.
@Junior.Store.Google.Play. 9 ай бұрын
thank you man
@skrypt7148
@skrypt7148 3 жыл бұрын
Its just so sad that he stopped but I respect that. May god bless you brackeys and best of luck
@Lnk-xh7ln
@Lnk-xh7ln 3 жыл бұрын
i agree sad ngl
@pilotrl2709
@pilotrl2709 3 жыл бұрын
Hello The Scripts Give my Error: CS0120: An object reference is required for the non-static field, method, or property 'HealthBar.SetHealth(int)' Any suggestion thanks :)
@superjeek16
@superjeek16 3 жыл бұрын
Myabe check your references in the health bar and your player script.
@Secretlycat31
@Secretlycat31 3 жыл бұрын
Yeah I have the same issue did you find a fix?
@pilotrl2709
@pilotrl2709 3 жыл бұрын
@@Secretlycat31 no i have not fix it but i will you send a link that it work
@waelalzoubi4473
@waelalzoubi4473 Жыл бұрын
@@pilotrl2709 i Think i know ur problem because i just had it too its because of the name and i just saw this is a year later
@DemHP.
@DemHP. 4 жыл бұрын
At 10:09 the "public HealthBar healthBar" could not be found even tho I've done everything he's done in the vid. Can someone please help?
@Peis6453
@Peis6453 4 жыл бұрын
i have the same have you found the solution?
@christiandiehl6804
@christiandiehl6804 4 жыл бұрын
Me too...
@d4rkwells688
@d4rkwells688 4 жыл бұрын
Same with me
@christiandiehl6804
@christiandiehl6804 4 жыл бұрын
It’s a public slider now, not health bar. Slider is capitalized.
@d4rkwells688
@d4rkwells688 4 жыл бұрын
And i fixed it, what comes after "public" it's the name of your health bar script. You might have named it with a different name
@felgedits
@felgedits 2 жыл бұрын
Awesome video! Wish you best of luck in the future!
@DavidAdochiti
@DavidAdochiti 4 жыл бұрын
Brackeys, never stop making tutorials plzz u r the only person with these amazing tutorials. U explain really well u r the BEST ❤❤❤❤❤👏👏👏👏👏
@pablogoni6267
@pablogoni6267 2 жыл бұрын
sadge
@EpheitStudios
@EpheitStudios Жыл бұрын
Aged like milk
@penguyYT
@penguyYT 3 жыл бұрын
2:34 HUD health bar. 15:30 Billboard health bar
@K2MusicKSquare
@K2MusicKSquare 4 жыл бұрын
It's a good tutorial but... how about those health bars that will show how much damage it takes on the bar with a different color area, and then the area gradually decreases in size?
@skyline2601
@skyline2601 4 жыл бұрын
make two sliders with different values
@K2MusicKSquare
@K2MusicKSquare 4 жыл бұрын
But how to adjust the speed? It may be too slow or too fast for the second slider...
@K2MusicKSquare
@K2MusicKSquare 4 жыл бұрын
@@joshuazollner2995 Thank you!
@goosegamer8111
@goosegamer8111 3 жыл бұрын
You are the Best Unity Tutorial Maker in the whole World!!!!!!
@nikosaarinen3258
@nikosaarinen3258 4 жыл бұрын
I've only recently picked up the hobby, but you know what? I'll join the game jam anyway.
@emmanuelpasqualecortez1982
@emmanuelpasqualecortez1982 3 жыл бұрын
the second script didn't work when I tried it, it keeps saying "The type or namespace 'Healthbar' could not be found"
@HalcyonVoid
@HalcyonVoid 3 жыл бұрын
Same here. Ever figure it out?
@jacobhudson1014
@jacobhudson1014 3 жыл бұрын
@@HalcyonVoid brackeys used health Bar as it is the name of the first script he wrote. If you didnt name your script healthBar, you will have to change it to the name of your first script. e.g. public HealthBarScript healthBar; [Healthbarscript for me NOT healthBar] void Start() { currentHealth = maxHealth; healthBar.SetMaxHealth(maxHealth); }
@starsquad9814
@starsquad9814 3 жыл бұрын
@@jacobhudson1014 Thank you so much. You have no idea how much you just helped me. You’ve made my day. Thank you
@chrisogb11
@chrisogb11 3 жыл бұрын
@@jacobhudson1014 omds thank you
@just.james.
@just.james. 3 жыл бұрын
Hello, i have a question: Y cant i drag my Health Bar into the "Health Bar" Slot? Is it because i am using Unity 2020.1? Please can someone help me
@joechristo2
@joechristo2 3 жыл бұрын
RayCat_LP Is there even a health bar slot there? If not, then make sure that the Health Bar variable is public.
@joechristo2
@joechristo2 3 жыл бұрын
RayCat_LP And make sure to put the name of the healthbar class after public
@just.james.
@just.james. 3 жыл бұрын
@@joechristo2 i just downloaded the Project, got the Scripts out of the scripts folder and got the "Player" and the "HealthBar" Scripts. But i just cant drag the Helath Bar object in the slot. The solt exists
@GetTheFreakingOreo11
@GetTheFreakingOreo11 3 жыл бұрын
I am having the same issue...
@GetTheFreakingOreo11
@GetTheFreakingOreo11 3 жыл бұрын
Okay I figured out what I did wrong. I moved the file location of my HealthBar script, manually, into the folder containing the Player script. After doing this, I was getting an error in Unity with my HealthBar tab about having some misplaced mono script. Then you just drag the healthbar script from your assets back into the "Script" option. Hope this helps.
@Pasi80
@Pasi80 2 жыл бұрын
Your Tutorials are the Best! :)
@diliupg
@diliupg 3 жыл бұрын
Missing Brackeys in 18-05-21. unparalleled knowledge and humour!
Brackeys Game Jam 2020.2 - BEST GAMES!
11:31
Brackeys
Рет қаралды 538 М.
SCRIPTABLE OBJECTS in Unity
8:57
Brackeys
Рет қаралды 985 М.
FOOTBALL WITH PLAY BUTTONS ▶️ #roadto100m
00:29
Celine Dept
Рет қаралды 30 МЛН
Разбудила маму🙀@KOTVITSKY TG:👉🏼great_hustle
00:11
МишАня
Рет қаралды 2,9 МЛН
【獨生子的日常】让小奶猫也体验一把鬼打墙#小奶喵 #铲屎官的乐趣
00:12
“獨生子的日常”YouTube官方頻道
Рет қаралды 112 МЛН
How to MAKE YOUR GAME LOOK GOOD!
13:02
Brackeys
Рет қаралды 582 М.
Turn-Based Combat in Unity
29:40
Brackeys
Рет қаралды 561 М.
choosing a game engine is easy, actually
15:08
samyam
Рет қаралды 176 М.
Easy Enemy Health Bars in Unity
9:25
BMo
Рет қаралды 41 М.
How to make a BOSS in Unity!
21:54
Brackeys
Рет қаралды 655 М.
The Future of Game Development
8:58
Brackeys
Рет қаралды 1 МЛН
Unity Player Health and Health bar Tutorial
10:52
MoreBBlakeyyy
Рет қаралды 14 М.
This Problem Changes Your Perspective On Game Dev
25:51
Jonas Tyroller
Рет қаралды 326 М.
How to make a Video Game - Godot Beginner Tutorial
1:17:12
Brackeys
Рет қаралды 798 М.
How to make AWESOME Scene Transitions in Unity!
19:45
Brackeys
Рет қаралды 910 М.
FOOTBALL WITH PLAY BUTTONS ▶️ #roadto100m
00:29
Celine Dept
Рет қаралды 30 МЛН