SCORE & UI - How to make a Video Game in Unity (E07)

  Рет қаралды 1,556,095

Brackeys

Brackeys

7 жыл бұрын

Let's create a score counter for our game!
● Download the Project Files: devassets.com/assets/how-to-ma...
❤️ Donate: www.paypal.com/donate/?hosted...
····················································································
This video is part of a mini-series on making your first game in Unity.
····················································································
► Join Discord: / discord
♥ Subscribe: bit.ly/1kMekJV
● Website: brackeys.com/
● Facebook: / brackeys
● Twitter: / brackeystweet
········································­­·······································­·­····
Edited by the lovely Sofibab.
········································­­·······································­·­····
► All content by Brackeys is 100% free. I believe that education should be available for everyone. Any support is truly appreciated so I can keep on making the content free of charge.
········································­­·······································­·­····
♪ Baby Plays Electro Games
teknoaxe.com/cgi-bin/link_code...

Пікірлер: 2 600
@fundamxd
@fundamxd 5 жыл бұрын
Tutorial : "How can a 9 minutes video take 2 hours of your time to finish watching it ?"
@HealthyWC-2
@HealthyWC-2 5 жыл бұрын
"Only 9 minutes?" Psh, coding is easy... "Wait, let me copy that code real qucik and pause the video" "Oh shoot, I got some errors in my code, AGGH I DON'T KNOW HOW TO FIX IT, I SUCK AT PROGRAMMING and I don't understand any of the answers online.... OH I GET IT NOW" "Where is that button located in Unity? I DON'T KNOW WHERE IT IS... found it" "Hm... I have some errors again but its look correct, ohhh I misspelled Transform, it was transfomr, silly me" This should cover your reasons. ;)
@adrianherralgot4071
@adrianherralgot4071 5 жыл бұрын
Lmao
@TimM-kz1vl
@TimM-kz1vl 4 жыл бұрын
@@HealthyWC-2 Protip: save a backup of your script if you like to occasionally experiment like I do.
@ivonedev9658
@ivonedev9658 4 жыл бұрын
it's 9.07
@higorss
@higorss 4 жыл бұрын
@@ivonedev9658 who the fuck care
@wiktortofil9149
@wiktortofil9149 5 жыл бұрын
"Anything but Arial". Let's go with Comic Sans.
@kevallion6199
@kevallion6199 5 жыл бұрын
ah ah ah no please xD
@synthjc5105
@synthjc5105 5 жыл бұрын
bruh
@benno6981
@benno6981 5 жыл бұрын
0_o
@potatoejerky2687
@potatoejerky2687 5 жыл бұрын
How 'bout Papyrus?
@dreconex
@dreconex 5 жыл бұрын
same
@rickole7404
@rickole7404 4 жыл бұрын
3:52 Red_Communist_Party.jpg what
@theparrot271
@theparrot271 4 жыл бұрын
Lmao nice catch
@sanzwastaken
@sanzwastaken 4 жыл бұрын
HAHAHA nice one ^^
@d-o-n-u-t
@d-o-n-u-t 4 жыл бұрын
da fuq
@ventanalila8185
@ventanalila8185 4 жыл бұрын
Comrade Brackeys
@nguyenhoanglong420
@nguyenhoanglong420 4 жыл бұрын
Comrade XD!!!! :3
@willpetillo1189
@willpetillo1189 3 жыл бұрын
For those using this as a reference or wanting to review specific parts of the lesson, here are some time-stamps of interest: 0:11: Improving project organization 0:34: Improving collision detection 1:27: Creating on-screen text 2:49: Scaling text with screen size 3:38: Downloading a new font and applying it to text 4:21: Getting player Z position 6:00: Updating on-screen text 7:45: Formatting text to display as whole numbers
@idkidc2573
@idkidc2573 3 жыл бұрын
thanks
@ultrawaveyt5582
@ultrawaveyt5582 2 жыл бұрын
life saver
@aneeq5446
@aneeq5446 2 жыл бұрын
Thanks it helped a lot
@rudrakshkumar6217
@rudrakshkumar6217 2 жыл бұрын
My player not moving, help!
@ultrawaveyt5582
@ultrawaveyt5582 2 жыл бұрын
@@rudrakshkumar6217 show me your code
@tamirrozenfeld3572
@tamirrozenfeld3572 Жыл бұрын
For who's having problem pulling component on 7:46, u should write public TextMeshProUGUI scoreText; instead of public text and than u will be able to pull component.
@icicle466
@icicle466 Жыл бұрын
i tried this but for me it says it couldn't be found what should i do?
@dementi5100
@dementi5100 11 ай бұрын
​@@tristanfp4887 at the top of the code
@mdszirgun8715
@mdszirgun8715 11 ай бұрын
hello, still dosn't work... any other advice?
@AbhijitBalaji-rw1kj
@AbhijitBalaji-rw1kj 11 ай бұрын
@@tristanfp4887 Thank you so much!!!
@Mihai_r4
@Mihai_r4 11 ай бұрын
Thx
@niallpeel7832
@niallpeel7832 10 ай бұрын
4:02 Brackeys adds a font by simply dragging into the project tab. If you are using TMP (Text mesh pro) you first have to create the font asset by going to Window>TextMeshPro>FontAssetCreator and then drag the font to the Source Font File. From there when you go to select the font to use you can find it in the pop out window as Brackeys does
@SciencewithIrfan
@SciencewithIrfan 10 ай бұрын
Thanks a lot!
@lickitysplickit
@lickitysplickit 9 ай бұрын
I can't even drag the text(TMP) into the Source Font File
@ExplodingJellyfish
@ExplodingJellyfish 6 ай бұрын
Mad 'preciate
@smitaparida7847
@smitaparida7847 3 жыл бұрын
Nobody: Literally Nobody: ME: Playing my own game for 8 hours straight.
@cosmic2750
@cosmic2750 3 жыл бұрын
i sympathize, and i kind of feel its that way because we're proud of our first project :)
@peeei7423
@peeei7423 3 жыл бұрын
same here buddy
@otmanesajid426
@otmanesajid426 3 жыл бұрын
me too xDDD
@l_sx8722
@l_sx8722 3 жыл бұрын
and the best thing is we are the "god" of our game, whenever we feel something needs to change, we change that
@Ryuga_019
@Ryuga_019 3 жыл бұрын
@@l_sx8722 yeh 😁
@spacemonkeyspiff
@spacemonkeyspiff 11 ай бұрын
For those who are using TextMeshPro instead of the legacy text, make sure to include the namespace for textmeshpro, which is TMPro (so include the line of using TMPro; at the beginning of your code). Also instead of using public text, use public TextMeshProUGUI
@Therealdot
@Therealdot 11 ай бұрын
Thank You
@JellyGang680
@JellyGang680 10 ай бұрын
wdym
@spacemonkeyspiff
@spacemonkeyspiff 10 ай бұрын
@@JellyGang680 In this tutorial, Brackeys uses legacy text as this video is 6 years old and I believe TextMeshPro was not a proper feature in Unity. Now, we can use TextMeshPro which I believe is more customizable and easier to use. For your score script, you need to add a using tag for TMPro, or else you will face errors.
@chili_01
@chili_01 10 ай бұрын
Thank you so much
@kuinkyo7292
@kuinkyo7292 10 ай бұрын
I used this but I’m still getting an error does anyone know how to fix this?
@zendox
@zendox Жыл бұрын
if you're doing this in 2022, there's an easy solution, you can still get the old text without using text mesh pro go into the game object tab at the top, then UI, then you should see legacy at the bottom. if you go into it you should see text. then follow the rest of the tutorial like usual, if you get stuck you can use the code below, or use the debug mode that brackeys showed using UnityEngine; using UnityEngine.UI; public class Score : MonoBehaviour { public Transform player; public Text scoreText; void Update() { scoreText.text = player.position.z.ToString(); }
@capnryna
@capnryna Жыл бұрын
Thank you so much!
@segwhkamaza6447
@segwhkamaza6447 Жыл бұрын
you YOU ARE SAİNT
@WalterHWhite-zl6bs
@WalterHWhite-zl6bs Жыл бұрын
Thanks so much man!!! I was struggling to keep up with the tutorial before
@liubovkushnierova8393
@liubovkushnierova8393 Жыл бұрын
YOU ARE MY HERO! Really, thanks!
@real_redux
@real_redux Жыл бұрын
you are a life saver
@krky
@krky 7 жыл бұрын
Thank you for not only this video but also your all Unity Tutorial videos.
@Brackeys
@Brackeys 7 жыл бұрын
You're welcome ;)
@Xmsnjeje
@Xmsnjeje 4 жыл бұрын
Emre Karakaya oyunlar yapabildinmi?
@krky
@krky 4 жыл бұрын
@@Xmsnjeje evet yapabildim, google play store'da yayınladım fakat güncellemediim için oyunlarım silindi malesef.
@erdemyilmaz6172
@erdemyilmaz6172 3 жыл бұрын
I agree with this comment. I was just someone who didn't know anything abt making games other than scratch but I had a passion and now I'm working on my first game with only tutorials I found on this channel. Thank you so much.
@rudrakshkumar6217
@rudrakshkumar6217 2 жыл бұрын
My player not moving, help!
@simonvutov7575
@simonvutov7575 14 күн бұрын
I watched this video 5 years ago when I was starting out learning to code. It's increadible how much the world has changed since then.
@philipgoetz8681
@philipgoetz8681 4 жыл бұрын
Brackeys: The only KZfaqr you don't have to crank up the playback speed for. These videos are really dense with material. I appreciate that.
@RadioactiveGamin
@RadioactiveGamin 7 жыл бұрын
I disable my ad-block for this channel as you do these videos pretty much for free, and you've motivated me in the past. Now I know a decent amount of C# and I got a little bit of experience with Unity thanks to your previous tutorials. Just nowadays I can't find the motivation to continue when I need it most :/
@Brackeys
@Brackeys 7 жыл бұрын
I'm glad to have helped :) For motivation I recommend forum.brackeys.com/ or this discord chat discordapp.com/channels/243005537342586880/243005537342586880 :) Good luck!
@AngelRodriguez-hs7bc
@AngelRodriguez-hs7bc 4 жыл бұрын
A lot of jobs are using Unity, and C#. If you need motivation - think of your potential career.
@DashMatin
@DashMatin 4 жыл бұрын
@@Brackeys thank you for making these tutorials . can you make a tutorial on making a game like ninja stick but in 3d please.
@chickencoder9178
@chickencoder9178 2 жыл бұрын
@@Brackeys i dont know how to put z in the Debug.Log?
@rudrakshkumar6217
@rudrakshkumar6217 2 жыл бұрын
My player not moving, help!
@TheMortemGaming
@TheMortemGaming 5 жыл бұрын
Dude I know this is a very late comment but you're the best. After this tutorial specifically I used the methods from EVERYTHING you taught me and I made it so that the score stopped on a collision, its a small thing but i felt so proud that I did it myself from what i learned from you. THANK YOU!
@sanzwastaken
@sanzwastaken 4 жыл бұрын
I'm happy 4 you! :)
@maan1509
@maan1509 4 жыл бұрын
Noice
@reaperplays4170
@reaperplays4170 4 жыл бұрын
can you plz give the code i have been trying for 2 hours and i still cant get it done
@EUBEEN123
@EUBEEN123 4 жыл бұрын
@@reaperplays4170 On the collision script, add "public score theScore" as a variable and in the if statement, add "theScore.enable = false" and link up the text to "theScore".
@amirmirzababapour6016
@amirmirzababapour6016 4 жыл бұрын
well done bro
@rishabhjain1056
@rishabhjain1056 5 жыл бұрын
I always refer to your videos to learn new concepts. Started this series to revise and make a simple demo game for learning a new concept. I actually learned new options and features I was not aware of. Please keep posting such videos
@mossaabtoualia8198
@mossaabtoualia8198 2 жыл бұрын
BUG FIX: For all of you who got an exception "The namespace '' already contains a definition...": Check if you have some of the script files in the Assets folder as well as in the scripts folder. If so, make sure the ones in the Scripts folder are updated and delete the ones in the Assets folder. This might have happened if you had the scripts open while moving them to the Scripts folder. It worked for me, hope it worked for you :) i found a this on the ep 8 i hope it work
@clxped2032
@clxped2032 2 жыл бұрын
omfg thanks soooo much ur a lifesaver
@SirDinzhi
@SirDinzhi 2 жыл бұрын
I wonder why I got that error, in the end i just figured out my script "score" was duplicated by accident. Thanks a lot man you saved me
@geoulhs9405
@geoulhs9405 2 жыл бұрын
Bro i will legit give you 10$ for solving that thank you
@erc5563
@erc5563 2 жыл бұрын
omg you saved me omg
@Sub-zero1123
@Sub-zero1123 2 жыл бұрын
Thanks a lot man
@gummygengar3215
@gummygengar3215 6 жыл бұрын
Your tutorials are absolutely outstanding! I have learnt so much more about designing and coding games thanks to you! Keep the tutorials up! They are very appreciated. Thanks
@ashutoshchakravarty2669
@ashutoshchakravarty2669 6 жыл бұрын
This guy explains everything very comprehensively he is a cool good and awesome youtuber.KEEP UP!!
@Alhedgehog
@Alhedgehog 3 жыл бұрын
These videos have been the greatest! Thank you so much for making them! You present stuff in a way that's extremely friendly to beginners and you manage to not linger on a bunch of small stuff at the same time. You are awesome!
@thenecromancer4113
@thenecromancer4113 Жыл бұрын
whenever my friends ask me how to do code, I immediately link them your channel. All of your tutorials are top tier.
@sedotan2
@sedotan2 7 жыл бұрын
OMG, i just got assignment from my college to make an UI in Unity and you upload this video. Thanks B!
@dynamichunter843
@dynamichunter843 7 жыл бұрын
Also check out how he did the UI in the tower defense series, it looks really cool
@iamgod4u907
@iamgod4u907 Жыл бұрын
if you are having trouble with adding score in Text (TMP) copy this: using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class Score : MonoBehaviour { public Transform Player; public TextMeshProUGUI scoreText; void Update() { scoreText.text = Player.position.z.ToString("0"); } }
@rax0503
@rax0503 Жыл бұрын
what the using TMPro; do
@iamgod4u907
@iamgod4u907 Жыл бұрын
@@rax0503 use to access text(TMP) object in our script cuz public Text scoreText; is for legacy text.
@rax0503
@rax0503 Жыл бұрын
@@iamgod4u907 I understand now thanks a lot
@4everbroke787
@4everbroke787 Жыл бұрын
You are a legend. Thanks!
@iamgod4u907
@iamgod4u907 Жыл бұрын
@@4everbroke787 😅😂thanx
@anirban7375
@anirban7375 3 жыл бұрын
This guy gives free education man....... soo cool, online crash courses take $200 and the quality here is better than them. Hats off to u bruh, keep it up.
@liammurray4199
@liammurray4199 2 жыл бұрын
I might be 4 years late but after 5 useless guides on this topic you just made things so much easier thank you so much
@ath.bar.7671
@ath.bar.7671 2 жыл бұрын
For those who don't have their starting position at Z 0, I made something to make it easier: 1. Add a public float variable called "initialZ" 2. Add a void Start() method (if you removed it) 3. Inside it, add "initialZ = player.position.z" (replace "player" with what you named your player) 4. On the top of the Update() method, add the following: "float newZ = plr.position.z - initialZ;" 5. Replace "player.position.z.ToString()" (where you change your text) with "newZ.ToString()" Your score will now start from 0 instead of minus something.
@SamZzzz11
@SamZzzz11 2 жыл бұрын
thanks
@SwirlY-sTrAw
@SwirlY-sTrAw 2 жыл бұрын
thank you for this
@abdelmoghithhaitar6568
@abdelmoghithhaitar6568 2 жыл бұрын
Thank you
@ccaudiolibrary3309
@ccaudiolibrary3309 Жыл бұрын
plz somone give me the full code for copy i have 2 error that saying: 1. Assets\Scripts\Score.cs(14,18): error CS0236: A field initializer cannot reference the non-static field, method, or property 'Score.player 2.Assets\Scripts\Score.cs(14,38): error CS0236: A field initializer cannot reference the non-static field, method, or property 'Score.initialZ' my code is: using UnityEngine; using UnityEngine.UI; public class Score : MonoBehaviour { public Transform player; public Text scoreText; public float initialZ; void Start() { initialZ = player.position.z; } float newZ = player.position.z - initialZ; void Update() { scoreText.text = newZ.ToString(); } }
@coolFM2001
@coolFM2001 7 жыл бұрын
can you add a respawn mechanic in the next episode please
@Brackeys
@Brackeys 7 жыл бұрын
Working on it ;)
@jadenlanzone9932
@jadenlanzone9932 7 жыл бұрын
Brackeys yay respawn
@maxmyzer9172
@maxmyzer9172 7 жыл бұрын
how to scale from center on MAC?
@witek1840
@witek1840 7 жыл бұрын
He done it in a live for a 2D game i tried and it's work for this
@bloodwolf2609
@bloodwolf2609 6 жыл бұрын
without respawn / boundary the game can get cheesed :O
@ajk1989
@ajk1989 5 жыл бұрын
These videos are great, nice quick pace but you seem to get the most important details in there. Can't wait to try this stuff out!!!
@louis-philip
@louis-philip 4 жыл бұрын
You have no idea how helpful you are... These tuts are gold!
@mr.mysteriousyt6118
@mr.mysteriousyt6118 7 жыл бұрын
keep up currently you are my best KZfaqr
@almond_robin
@almond_robin 4 жыл бұрын
Dani sent me here and i love these tutorials, thanks bracky
@thisaccountisinactive1075
@thisaccountisinactive1075 Жыл бұрын
This man is a genuine hero to so many amateur coders
@OmarMohamed-tn8es
@OmarMohamed-tn8es 4 жыл бұрын
For anyone didn't set player start z position to 0. Make an int equal to the player start position like( int x = - 55;) Then ScoreText. text = (Player. Position. z+x). Tostring("0")
@TemphinFD
@TemphinFD 4 жыл бұрын
Thanks. What if I want to divide it. I'm starting on 40 and I want it to give me a point every 50 starting from z = 50
@dikshitkanani6298
@dikshitkanani6298 4 жыл бұрын
Thanks
@OmarMohamed-tn8es
@OmarMohamed-tn8es 4 жыл бұрын
@Wowkoby That mean something wrong in your code text make sure you wrote it correctly and you didn't miss semicolon or send me your code so i can help
@user-rb1xv7iw2c
@user-rb1xv7iw2c 4 жыл бұрын
For those who have the position with decimal number use float
@OmarMohamed-tn8es
@OmarMohamed-tn8es 3 жыл бұрын
@Alessandro Bova 7:32 in the script
@TreeKillah12
@TreeKillah12 7 жыл бұрын
You are a fantastic teacher. Thanks for the interesting and informational tutorials!
@Actually_saif
@Actually_saif 5 жыл бұрын
when ever i expand my game view i cant move my character using A and D but whenever its in default view everything works fine
@vishuu528
@vishuu528 4 жыл бұрын
@@buritto8784 god thank you so much!
@detyvitanova749
@detyvitanova749 4 жыл бұрын
You can also use the combination Ctrl + P to start and that way you won't need to click on the screen
@MONOCUTZ
@MONOCUTZ 3 жыл бұрын
@@detyvitanova749 thank u
@adityarana7956
@adityarana7956 3 жыл бұрын
same issue!! How to figure it out?
@MONOCUTZ
@MONOCUTZ 3 жыл бұрын
@@adityarana7956 click on the game window or click maximise on play
@Destiny4CODERS
@Destiny4CODERS 8 ай бұрын
I Had Been Copying Every Other KZfaqr's Video To Make My Video Game. But Because Of Your Course, I Can Make My Own Game Without Copying Anyone . thank you legend💖💖💖💖
@AmeliaSmolak
@AmeliaSmolak 4 жыл бұрын
Thank you. You inspired me to learn to program and make games but most importantly you taught me how to do it. I hope you are doing fantastic cuz you are a really good person
@oldladyjuljul
@oldladyjuljul 5 жыл бұрын
I'm really enjoying following along to this tutorial! Thanks so much for making these series. If you are like me and in the part where we add in scoreText.text = player.position.z.ToString(); code and playtested, you may have had an error in the code. Something along the lines of "variable player of Score is not assigned". That is because the script affects the player and the text, so the Text AND the Player get the script. Just uncheck the score script from the Player in inspector and it's good to go. Don't be like me and scub through the video and restarting unity many times. Instead, google the answer next time :') Hope this helps!
@limegreentechnologies8803
@limegreentechnologies8803 3 жыл бұрын
thank you so much! this helped. the game worked but that error message was really annoying me, Thanks!
@watson8075
@watson8075 2 жыл бұрын
that's.... two years ago now you probs figured it out
@iKingOf
@iKingOf 3 жыл бұрын
Font Size: 69 I really hope that was intentional.
@yeetboi1927
@yeetboi1927 3 жыл бұрын
hahaha
@yeetboi1927
@yeetboi1927 3 жыл бұрын
so childfriendly
@scampernoodle6757
@scampernoodle6757 3 жыл бұрын
bruh moment
@Fancysand
@Fancysand 3 жыл бұрын
69 LIKES
@scampernoodle6757
@scampernoodle6757 3 жыл бұрын
@@Fancysand OMG BRUH
@emerykj1830
@emerykj1830 4 жыл бұрын
Great series I learned more in this than a Udemy course. You just make it more understandable, even if they might have more details. For anyone who's number keeps the decimals, put in ToString("f0") . It was probably updated since this video, and the float means a decimal, so set the float to zero! ( As far as I understand it).
@TheWizard991
@TheWizard991 Жыл бұрын
I've made Jumpy Cube game with the help of Brackeys videos. Such a nice guy to share all his skills with us.
@GameOver7853
@GameOver7853 7 жыл бұрын
Brackeys is simply the best
@journeyingwithchrist22
@journeyingwithchrist22 2 жыл бұрын
My method of learning is to watch the whole video through, and make notes without pausing it. Then attempting everything from memory, then use my notes to help or end up re-watching parts of the video I got stuck on. That way I feel like I'm doing most the stuff myself.
@alessandromartini5351
@alessandromartini5351 3 жыл бұрын
Once I will end this course I will 100% leave a donation on your website, this channel is extremely helpful
@srwaan
@srwaan 4 жыл бұрын
dude THANK YOU I was getting crazy trying to make a text prefab update a text on screen (surprise! it didn't work) so I watched your video and BAM. it works like a charm now. Thanks!
@DrunkScout
@DrunkScout 4 жыл бұрын
Dude, you're amazing. Thank you for sharing this info.
@nuggetlord4104
@nuggetlord4104 3 жыл бұрын
For anyone following this tutorial in 2021 or until they change it, you can add text from GameObject(at the top) -> UI -> Text
@nani8659
@nani8659 Жыл бұрын
ty bro you saved my code i was using the wrong type of text (text tmp)
@Mhmmdrl
@Mhmmdrl Жыл бұрын
Or help I can’t find text only mesh pro I can’t put it in the score scprit
@heyitsclayyy3002
@heyitsclayyy3002 4 жыл бұрын
I think this was the easiest one to follow, I’m glad UI is easier than I thought
@SandsAgain
@SandsAgain 3 жыл бұрын
ive been trying to make a game for so long but didnt know how to do it , then i found this, thank you.
@normanp.chesterton7397
@normanp.chesterton7397 5 жыл бұрын
Another note: Just taking the Z distance works fine in this instance, but if you want to be able to be less constrained in your level design, you would use the distance between the starting vector and the current position, of course. The author of this video knows all of this, of course - I am just adding some things that might be useful to the audience.
@NiclasQTN
@NiclasQTN 5 жыл бұрын
Yeah he kinda mentioned that
@tomthebigman7481
@tomthebigman7481 4 жыл бұрын
How?
@Rodri-gv8uf
@Rodri-gv8uf 4 жыл бұрын
@@tomthebigman7481 Guess we'll never know...
@Rodri-gv8uf
@Rodri-gv8uf 4 жыл бұрын
Could you please tell us how it's done? My player is at a negative z position, so the score remains negative. If I could do what you said, I'd be able to fix it.
@skyline2601
@skyline2601 4 жыл бұрын
@@Rodri-gv8uf make the text = to the current position minus the starting position of the cube
@steel2229
@steel2229 3 жыл бұрын
5:59 "So again we'll go into unity" *proceeds to open visual studio*
@abuabdullah9878
@abuabdullah9878 2 жыл бұрын
For a second there, I thought this video was going to be about making a musical score for your game. This makes much more sense.
@Dilllly
@Dilllly 5 жыл бұрын
I love tutorials like this, I come here to learn and it presents an amazing tutorial on the basics and i use the information to learn to make the game i want. I created a script that converts the distance to a percentage. My obstacles are differents weights and the game shows the heavier blocks to be darker which is calculated in a script, and i surprised myself by added a balanced jump mechanic. I urge everyone to experiment with these tutorials if you aren't already. It really shows that your learning to make a game without someone telling you exactly how to do it and it's an amazing feeling.
@Kabatemasmusic
@Kabatemasmusic 7 жыл бұрын
appreciate that you speed up your videos by cutting the parts without speed. but I think it went too fast ;)
@ThatOneRobloxDev
@ThatOneRobloxDev Жыл бұрын
2:39 If you are using Text Mesh Pro, then disable "Wrapping" instead of enabling "Overflow"
@platrick5431
@platrick5431 Жыл бұрын
ty this worked for me
@ProRobForEveryone
@ProRobForEveryone 2 жыл бұрын
I also add the y and x position to score. Worked perfectly.
@gonmigamez9072
@gonmigamez9072 5 жыл бұрын
OMG dude you literally solved half of my problems THANKS ....
@jakecarpenter1838
@jakecarpenter1838 3 жыл бұрын
I downloaded the script because when I tried to type it out, I couldent get the player as a target for the score, and the downloaded script also doesnt work its says "A using clause must precede all other elements defined in the namespace except alias declarations" and idea whats wrong
@thelegendarynarwhal7651
@thelegendarynarwhal7651 3 жыл бұрын
Alright, I see a lot of people have a problem where this error happens "UnassignedReferenceException: The variable Player of Score has not been assigned." And I got this as well. The error is most likely that you forgot to do this part 5:35 and you might have forgotten to do the same with the script. If you still have problems don't be afraid to reply to this comment.
@davidskubic8521
@davidskubic8521 3 жыл бұрын
tanks you helped me a lot
@itsjames_9832
@itsjames_9832 3 жыл бұрын
I'm having this problem, but i have assigned the player to the variable, im very confused.
@mislavhorvat2712
@mislavhorvat2712 3 жыл бұрын
I did everyrhing that you said and I still got the error
@Ficli
@Ficli 3 жыл бұрын
i have a problem that so that the i dont have the "Player" variable in the "Score" script which prevents me from draging the player into there If anyone knows what i could have done wrong please reply with the solution i accidentaly closed unity but im going to open it so i can ctrl+c ctrl+v the error message edit:Assets\Scripts\Score.cs(5,14): error CS0101: The namespace '' already contains a definition for 'Score'
@notkairos
@notkairos 3 жыл бұрын
You are the best kind of human.
@janphillipdacallos4214
@janphillipdacallos4214 4 жыл бұрын
This is the perfect tutorial I ever watched, thankbyou!💖
@ViranMusick
@ViranMusick 3 жыл бұрын
Man your tutorials are SO DAMN HELPFUL! Cheers!
@tuckerkrause5838
@tuckerkrause5838 6 жыл бұрын
1:25 THANK YOU that has been annonying me sonce Ep 1
@kangar1797
@kangar1797 5 жыл бұрын
Ret Zy oh GOD I THOUGHT I WAS THE ONLY ONE!!!
@razkanaz
@razkanaz 3 жыл бұрын
Since*
@MrWestonO
@MrWestonO 3 жыл бұрын
"But please, anything but Arial" Comic Sans has joined the chat
@lucasgamesfr6s5
@lucasgamesfr6s5 3 жыл бұрын
excuse me sir, i can see you watched the video quite recently, so i have a question about a newer version of Unity. Whenever i right click on the left side (where all the objects are) the "ui" option doesn't show up. can you tell me where it is now ? thanks
@veridius2274
@veridius2274 3 жыл бұрын
​@@lucasgamesfr6s5 It's a bug from Unity, by accessing the "Game object" tab, you'll find the user interface option or "UI".
@axeloit2187
@axeloit2187 2 жыл бұрын
@@veridius2274 ahh i can t find it and i am just starting understanding what to do but aa where can i find game object because i am not from anglish speaking countries and it is hard for me to understand hat to do perfectly.. thank you for answer
@hjc1710
@hjc1710 4 жыл бұрын
As always, you the man. Thanks for the great content, you really rock.
@akadopeboi
@akadopeboi 4 жыл бұрын
Hey Brackeys, taking some time off work and decided to pick up some Unity knowledge. Thank you for making these, Beer on me. Ill refrence you in the credits of every game I ever make :)
@denislavkaragiozov5876
@denislavkaragiozov5876 5 жыл бұрын
I followed this series for 4 consecutive episodes and now im getting game dev ads nonstop xD the "algorithm" works.
@shazboi
@shazboi 5 жыл бұрын
same here : )
@SAW10
@SAW10 7 жыл бұрын
I love your videos!
@MiScusi69
@MiScusi69 2 жыл бұрын
my game is getting better and better. thanks!
@FunNooberCodingForBeginners
@FunNooberCodingForBeginners 3 жыл бұрын
This tutorial really helped in setting up UI for my first person shooter. Like from me!
@JustAhmed_yt
@JustAhmed_yt Жыл бұрын
People who dont find "Text" but who find "Text meshpro" The text UI thing is in "legacy"
@JustAhmed_yt
@JustAhmed_yt 11 ай бұрын
no prob3 people liking this + myself Xd
@user-iw2zv9bp4o
@user-iw2zv9bp4o 3 жыл бұрын
7:42 I am a newbie and I solved this problem my way. Surprisingly, my code works correctly. I decided to leave my decision inside the game, because my own terrible is better than someone else's and beautiful. By the way, here's my code: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Score : MonoBehaviour { public Transform player; public Text scoreText; int convertPositionZ = 0; void Update() { convertPositionZ = (int)player.position.z; scoreText.text = convertPositionZ.ToString(); } }
@lucasalaminogomez2238
@lucasalaminogomez2238 Жыл бұрын
well I have a problem converting the int format and your code helped it!! thanks you mate ^^
@timothygao9442
@timothygao9442 4 жыл бұрын
You have to increase the forward force when you increase the fixed update because of something he mentioned in one of the previous videos: We are doing force * time.deltatime which means that as you check your frames more often, the speed will become slower(remember that time.deltatime measures the time since the last frame). This means that as you check your frames more often, each frame will increase the force less. But note that this relationship is not linear
@hey-ef6wv
@hey-ef6wv 3 жыл бұрын
this guy helped millions of people to start game dev in the lockdown and corona peroid
@10dvvks.d.r.tharun15
@10dvvks.d.r.tharun15 3 жыл бұрын
yes
@sanzwastaken
@sanzwastaken 4 жыл бұрын
1:08 I put mine on 8000... it FLEW like a Kamikaze! 0_o Loving this series so far, thank you so much 4 making it ^^
@starman4346
@starman4346 4 жыл бұрын
reenact 9/11
@xord1946
@xord1946 4 жыл бұрын
I had the same problem, then I realise I messed with the Time Manager without realising.
@sanzwastaken
@sanzwastaken 4 жыл бұрын
@@starman4346 LMFAOOOOO
@sanzwastaken
@sanzwastaken 4 жыл бұрын
@@xord1946 Well, glad you got it fixed tho! :D
@wssoup
@wssoup 3 жыл бұрын
7:29 is the part we all come back to every month
@sportyslithy1463
@sportyslithy1463 4 жыл бұрын
I am watching this during lockdown. I am now going to make a game, I also watched all his vids together and I think I can make it to the end of my game. Unity has taught me that 2d games are harder to make.
@zerlontroytabuco8049
@zerlontroytabuco8049 4 жыл бұрын
3D Games would make it the hardest to make for us. Have you finished making your game?
@tghhh19
@tghhh19 4 жыл бұрын
The pure joy of seeing those numbers count up! =D
@YoloMasterGamerTag
@YoloMasterGamerTag 4 жыл бұрын
for me it counts down from -499. any pointers ?
@mridupabanbhattacharjya1518
@mridupabanbhattacharjya1518 4 жыл бұрын
I am a big fan of yours. Can you teach to carry score from one level to next level,please
@cinnamints_
@cinnamints_ 6 жыл бұрын
Assets/Code/Text.cs(14,19): error CS1061: Type `Text' does not contain a definition for `text' and no extension method `text' of type `Text' could be found. Are you missing an assembly reference? Plz help
@yadagunther
@yadagunther 5 жыл бұрын
not sure if you still need this but if anyone else does they can look here cause I had this problem at the top make sure you added Using UnityEngine and not just Unity.
@broman1439
@broman1439 5 жыл бұрын
are you using text mesh pro? the method he is talking about only works with the default text editor
@doablenode2193
@doablenode2193 3 жыл бұрын
absolutely love these turorials it teaches me the fundemantals and some code for future use even though i dont really know c#
@doablenode2193
@doablenode2193 3 жыл бұрын
3.35
@podjy6289
@podjy6289 2 жыл бұрын
Is it only me who gets insane satisfaction when you try to guess the next step and it acctually works?
@DawnosaurDev
@DawnosaurDev 7 жыл бұрын
I'm trying to make a high score but I don't know how you convert a string to a int or float? Please help thx
@WritInWater
@WritInWater 7 жыл бұрын
int test = System.Convert.ToInt32("1000"); Debug.Log("string of 1000 - 400 =" + (test-400)); Displays "string of 1000 - 400 = 600" in console. You can also place some string variable in ToInt32(). Beware - if the string cannot be 'cleanly' converted to an Int32, it will throw an exception error. You can use a Try/Catch statement for best practice. There are similar Convert commands for other data types, which you can see once you type 'System.Convert.' into visual studio. You could also place the 'System' namespace in the 'using' statements of your script, then just use the Convert statement in the body.
@Faris._.
@Faris._. 5 жыл бұрын
in case anyone faced a problem where the player is SO fast and skip through every obstacle , its because you put the time step at 0.1 instead of 0.01. just in case :)
@OK-ps2vz
@OK-ps2vz 5 жыл бұрын
I decided to play test, and suddenly, my player/cube was able to go past the obstacles. It physically made contact with the obstacle, but it would just speed past it, and my movement would keep going on. Have you experienced this?
@MichaelSalton
@MichaelSalton 4 жыл бұрын
i am having that problem, where do i go to change that value?
@roboticreviewer9159
@roboticreviewer9159 4 жыл бұрын
@@MichaelSalton go to edit at the top left and at the bottom it says project settings then there's a tab called time you go to and its called fixed timestep
@quinbrigham506
@quinbrigham506 4 жыл бұрын
​@@roboticreviewer9159 It wont let me edit the fixed Timestep
@quinbrigham506
@quinbrigham506 4 жыл бұрын
I go to edit. Then hit project settings. then a tab pops up. then i go to time. then you cant edit anything.
@alex1987xxxx
@alex1987xxxx 5 жыл бұрын
Your tutorials are the most best
@iliketrains5508
@iliketrains5508 Жыл бұрын
To anyone watching this in 2022, select "text legacy" when making the text. You would find it under UI --> Legacy --> Text
@barkatheleader2195
@barkatheleader2195 Жыл бұрын
TYSM
@HaloWolf102
@HaloWolf102 4 жыл бұрын
If anyone wants to disable the text, and then enable it on start up. Go into your Score script, make a Start() method and put score.enabled = true; This text controls the little checkbox besides the Text element, where you probably typed 250. Then, go to your text element, in the text object, and disable it, and on start up, it should appear. If you want to keep it enabled, and leave it there, obviously just change the text to 0.
@skittlebread41
@skittlebread41 4 жыл бұрын
Mech I need help and since this is an old video I though my best shot was to reply to someone, and you seem like you know what you’re doing. When I was trying to get the text to work it suddenly got really low quality and won’t go to a size over 27. I’m not sure how to fix it, please help.
@HaloWolf102
@HaloWolf102 4 жыл бұрын
@@skittlebread41 I completely forgot how to code, I'm sorry. I dropped off and I need to learn it again. I don't even understand what I'm saying in my own text.
@fadelazidan7731
@fadelazidan7731 2 ай бұрын
am i watching a tutorial from 7 years ago? Yes am i happy with it? Hell Yes Thank you
@lesleychingwena2611
@lesleychingwena2611 4 жыл бұрын
great tutorial; short and simple
@wyatts5159
@wyatts5159 3 жыл бұрын
When I tried to input the player into the score script under text there was no place to input it
@mauleblanc4147
@mauleblanc4147 3 жыл бұрын
I have the same thing help
@NandKumar-ex6mw
@NandKumar-ex6mw 3 жыл бұрын
You might have used Transform player instead of public Transform player In script ,check it again
@jorgem.7408
@jorgem.7408 3 жыл бұрын
This happened to me as well but noticed I accidentally dragged the playerMovement script down on the assets section. So it was telling me it already existed. Removed the dupe and I was able to drag it to score script.
@cybro8925
@cybro8925 6 жыл бұрын
When in fullscreen with the aspect ratio set to 'Free Aspect', my score text doesn't show up--it cuts off my text. How could I get it working like in the video?
@MaticBenda
@MaticBenda 3 жыл бұрын
same
@helloofjdidjdineodndosmspz8699
@helloofjdidjdineodndosmspz8699 3 жыл бұрын
@@MaticBenda canvas scalew with screen size @TheCy-FiJuggernaut
@kapilshandilya903
@kapilshandilya903 Жыл бұрын
Your video is amazing and keep up the good work!!!
@themrsnek2317
@themrsnek2317 Жыл бұрын
Thank you man for sharing this stuff
@hopiconb
@hopiconb 2 жыл бұрын
-For anyone who wants the score to stop counting when you fail, just change the score script adding if (movement.enabled == true) { scoreText.text = player.position.z.ToString("0"); } -and dont forget the "public PlayerMovement movement;"
@Frvgii2368
@Frvgii2368 2 жыл бұрын
you are a genius
@StarrDust12
@StarrDust12 5 жыл бұрын
When I do this my player doesn't move anymore, any fix to this? Edit:even after undoing back to the previous save, this is not fixed.
@bluestareverything9716
@bluestareverything9716 4 жыл бұрын
Well I had this problem and fixed it by going to the component score script and putting the text in the score text and on top of the score text is player where you put player in the none (transform) tell me if this description was confusing (ps it might be too late since it’s a month later)
@bhaveshjain2827
@bhaveshjain2827 4 жыл бұрын
@@bluestareverything9716 well it did help me dude thanks a lot i know im 4 months late ;
@bluestareverything9716
@bluestareverything9716 4 жыл бұрын
pscb animation well glad to help
@johna.5293
@johna.5293 4 жыл бұрын
Tip: Turn of gravity and you can float off the edge of the platform and dodge all the obstacles ;)
@idsewiersma1277
@idsewiersma1277 5 жыл бұрын
Great tutorial series!!!
@hpr895
@hpr895 5 жыл бұрын
Hi! If you using the Text Mesh Pro, just add this on "using": using TMPro; then: public TextMeshProUGUI scoreText;
@corbanXV
@corbanXV 4 жыл бұрын
god thank you so much man, was thinking why it wasn't working
@simone0142
@simone0142 4 жыл бұрын
You're the best
@black_sauce2478
@black_sauce2478 3 жыл бұрын
Helps a lot
@lemmin_
@lemmin_ 3 жыл бұрын
How can I use Text Mesh Pro? Should I download it or is it included in the Unity editor?
@Orincaby
@Orincaby 3 жыл бұрын
i had this problem too
@robertnicu
@robertnicu 3 жыл бұрын
i accidentally made everything the other way around and my score is negative. how do i fix it? Edit: scoreText.text = (player.position.x*-1).ToString ("0"); instead of scoreText.text = player.position.x.ToString ("0"); is the solution if it helps
@helloofjdidjdineodndosmspz8699
@helloofjdidjdineodndosmspz8699 3 жыл бұрын
@@mungutribe9444 its the z [psition not x
@helloofjdidjdineodndosmspz8699
@helloofjdidjdineodndosmspz8699 3 жыл бұрын
youve put x position its z
@flashverse2.06
@flashverse2.06 3 жыл бұрын
May God bless this man,he has helped me alot
@ENDERMOUS
@ENDERMOUS 5 жыл бұрын
Thank you very much Brackeys ^.^
@Qrown1145
@Qrown1145 3 жыл бұрын
Mr Brackeys I need Help XD Whenever I put a Text or Size it up its so Blurry how do I FIX it?
@pinkgambino9495
@pinkgambino9495 3 жыл бұрын
probably the fog
GAME OVER - How to make a Video Game in Unity (E08)
12:11
Brackeys
Рет қаралды 1,3 МЛН
How to make a menu in Unity - UI Tutorial
26:27
Tarodev
Рет қаралды 178 М.
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 145 МЛН
I Built a Shelter House For myself and Сat🐱📦🏠
00:35
TooTool
Рет қаралды 9 МЛН
100❤️ #shorts #construction #mizumayuuki
00:18
MY💝No War🤝
Рет қаралды 20 МЛН
WHY IS A CAR MORE EXPENSIVE THAN A GIRL?
00:37
Levsob
Рет қаралды 12 МЛН
7 DEVS Make a GAME without COMMUNICATING!
17:18
Blackthornprod
Рет қаралды 642 М.
The Future of Game Development
8:58
Brackeys
Рет қаралды 1,1 МЛН
The Easiest Way to Make a High Score in Unity
6:34
BMo
Рет қаралды 26 М.
Build a beautiful 3D open world in 5 minutes | Unity
5:57
spaderdabomb
Рет қаралды 311 М.
The Unity Tutorial For Complete Beginners
46:39
Game Maker's Toolkit
Рет қаралды 3,1 МЛН
8 Years of Game Development
8:29
Jackson Academy
Рет қаралды 514 М.
How to make a HEALTH BAR in Unity!
21:06
Brackeys
Рет қаралды 1,1 МЛН
GAMEPLAY - How to make a Video Game in Unity (E06)
8:15
Brackeys
Рет қаралды 1,5 МЛН
8 DEVS Make a GAME without COMMUNICATING!
13:21
Blackthornprod
Рет қаралды 964 М.
5 DEVS Make a GAME without COMMUNICATING! (INSANE end result)
15:42
Blackthornprod
Рет қаралды 1,3 МЛН
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 145 МЛН