That's because anyone can make a course on udemy, so you'll get a lot of crap on their, there are some high rated ones though, and they explain a lot more than brackeys does in this video, that might be confusing to complete beginners, this is a good one udemy.com/unitycourse or udemy.com/unitycourse2
dude. I was legit so excited when I made the box jump forward! lol even called my wife in to my office "babe! come check this out!" needless to say she was not very impressed lol
@@digvijaysingh5290 its like the 15th most wishlisted game on steam, lets get to #1 GAMERS SIPS MILK: REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
For those using this as a reference or wanting to review specific parts of the lesson, here are some timestamps of interest: 0:14: Creating a Script. 1:15: First look at C# code in Unity. 2:03: Printing to the Console (using the Start method). 3:33: Changing the value of a component through code to turn off gravity. 4:54: Using function arguments to apply force to a Rigidbody 5:40: Applying force over time (using the Update method). 6:27: Making your code frame-rate independent with Time.deltaTime 8:11: Physics Best Practices: using FixedUpdate 8:37: Writing comments to make your code easier to understand
I'm a game artist for 4 years now, wanted to learn a bit more about the whole process of making a game and dip my toes in. I was following a course on udemy, was getting totally lost had no idea how any of it worked, saw a comment recommend this channel. Wow, so much better! you explain everything so well and in a logical path I already understand more in 30 minutes than 5 hrs on that course. Thanks dude!
For Visual Studio 2019 I had issues with getting IntelliSense(Auto Complete) to work with unity. To fix this I closed Visual Studio, went to Unity then Edit -> Preferences -> External Tools -> External Script Editor. Set it to Visual Studio (your installed version of VS). When I re-opened Visual Studio by double clicking the script, everything then worked.
To anyone new coming in and being confused like I was: In the beginning he adds a new component, a script, and chooses the programming language. You probably won't see the option to pick a language. Since he made this video, it has changed and now C# is the only language unity uses, so you don't have to worry about that, just create a script and follow from there!
The script doesn't work tho using UnityEngine; public class PlayerMovement : MonoBehavior { // This is a reference to the Rigidbody component called "rb" public Rigidbody rb; // We marked this as "FixedUpdate" because we // are using it to mess with physics. void FixedUpdate () { rb.AddForce(0, 0, 2000 * Time.deltaTime); // Add a force of 200 on the z-axis } }
This is a really well made tutorial. Videos like these really help make unity and C# seem less intimidating. I haven't found a Unity tutorial nearly as good as this one, and i'm really glad that I've found it. Thank you for making this.
"We can see that everything looks fine, but there's one problem." Any programmer will resonate with this sentence. If you think it works the first time, then the code is lying to you.
@Frost Bite. If you have the reference typed out like you have it above then I see 2 issues, first you have a space between the words rigid and body, it is written as just one word. The second issue is capitalization, when creating a reference to a rigidbody you have to capitalize the R, so it should read public Rigidbody rb; (notice how public is not capitalized but the R in Rigidbody is capitalized) If you do have this typed out properly then my next guess would be that you have not dragged the rigidbody component into the inspector. both of these problems would flag an error in your console. if you get an error that says "Unassigned Reference Exception" this means you need to drag the component into the inspector. If your error reads "PlayerMovement does not contain a definition for "rigid body", it means that you have incorrectly typed out the public Rigidbody rb; in your script (for this example anyways). I hope this helps :)
If your game looks ugly press "Auto Generate Lighting Off" in the bottom right corner and in "Enviorment Lighting" Click "Source" and Change it to your liking! . Please like if this was helpful!
Thank you, Brackeys for doing these. I also started making games (my first was the control system for a fighter jet in a flight sim I made) in the game and physics engine in Blender. And now, partly from you, I'm learning C# and Unity. Thank you again.
For those ones using Visual Studio Community and your code doesn't auto complete while typing or you don't see code suggestions: Go to Unity >> Edit >> Preferences... >> External Tools >> Change "External Script Editor" to Visual Studio Community. I'm a beginner and had a hard time figuring this out. Hope this helps. Happy Coding! 😊
thanks, this must be like making an instance of a method, i've only have coding experience in java and python. Why didn't he include this in the video?
please, people. if something doesent work, first check that you dident miss anything in the tutorial. its easy to go on autopilot when watching tutorials.
When it said “Hello world!” In the console for me I said... “YEEEEEESSSSSS!!!!” But hay, when you don’t know how to code and something works you have to celebrate the little things. Yay, I am following the directions right!
You and me both dude xD when I got that to work and with the deltatime, I spent more time doing victory dance than actually looking at the video to recap xD
Man, these videos are really good made! it explains well how the basics (so far) of coding and programming works. If it is fine by you, I will refference this playlist in my research for school, where I look what I can do with unity for the first time. Thx to you, I got into unity :)
@@karolingston true, programming is like a dark cave but with jewels inside, you can get stuck, and it's hard to get out sometimes but in the end... you die of the errors you are getting
@@1nterlinked_ was making a joke based on the name, mate. Apologies - sadly new work situation and dealing with a death in the family (plus all the paperwork involved) hasn't left me much time for hobbies, much to my disappointment.
for anyone who has problems unchecking the use gravity by the code make sure you have dragged the rigidbody component into the script's rb part. it only works after you have done that . i had the same problem too .
@@chrishillin9463 look at 4:00 - 4:16 in the video and you will see him do it were he dragged the rigidbody component into the script's rb part im bad at explaining but hope this helps
I'm really enjoying the videos so far. Usually on most tutorials it doesn't explain very well and just doesn't work. I only had one bug which was when I was constantly trying to move the block forward and I couldn't get it to work. After 5 minutes I realised I wrote RB instead of rb.
I'm going to say this without wanting to diminish the merit and quality of this tutorial series (which is great), OR without wanting to hinder anybody trying to get into making games without learning programming first, because a lot of great indie game designers and developers are not programmer at heart. But I now truely believe...you won't drop learning to make games that easily if you learn coding first, especially to really get what's going on here with Unity. Like I started making my little 2D projects on GMS1.4 and RPG Maker (I'm way more a 2D character artist at heart) almost ten years ago, never finished one, and the barrier of entry was way lower than this. I had other stuff to do, but also, I got frustrated with every technical issue. I remember already getting stuck four years ago on GMS because It was hard to code a script for a typewriter effect on text display (like dialogues and whatnot) and feeling very disheartened by the fact that I just didn't understand the videos explaining how to do that. All because going through an array or a string using indexes, or for/while loop were not things I took interest for beforehand. Since then, I became a webdev (fullstack JavaScript) and for my new job, I need to learn C# and .NET. And WOAW. Unity is way simpler than I thought it would be. Thanks to the quality of the tutorial, YES, absolutely. But also because I spent 45 hours the past week learning the basics of C# for a maintenance job, AND I already have a training in development (only six month okay, I'm not a computer engineer). So just a piece of advice, for those who can afford a little time on the side: learn just a little programming and C# syntax before getting into Unity. You'll see, you will be way more at ease, and there will be less chances of you dropping this at the very beginning of this great tutorial series. Go on France.ioi (www.france-ioi.org/index.php?sLanguage=en) select any language (preferably Python that has a pretty simple syntax) and do the first 50 exercises; it will wake up a little bit of Math and it'll teach you the two or three tricks that you will need to use constantly (the loops, if statements, types basically). If you want more of these, go to Codewar and do level 8, 7 and 6 if you can. And also, go to Brackeys C# basics (th-cam.com/video/N775KsWQVkw/w-d-xo.html), go to CodeCademy and do the first two or three modules explaning the syntax of C# (www.codecademy.com/learn/learn-c-sharp) even though not everything will be useful for Unity, you'll understand the basics of strongly typed language and why certain declaration of variables will look like you are stating the same thing thrice... I know it doesn't look like a lot of fun at first, but I promise it's worthwhile, and all these ressources are free! I wish someone had showed me that years ago, I would've probably be a webdev for years now, and maybe a gamedev too... Have fun making games!
You are 100% right. I have been coding since I was 10 years old and coming into Unity is still daunting. If I wasn't an experienced (amateur, to be clear) programmer already this would be too overwhelming. If I didn't have a grasp on basic programming concepts/problem-solving skills/data structures/etc etc etc... this would be a pretty silly thing to try and learn. I'm embarrassed even looking at my code from three years ago It makes me sad to think how many creative people are out there who want to make a game but just let it die because they bite off too much at once. The ONLY way to get good at coding is to start small :/
Hey thanks for the advice just started with unity watched ep 1 and havent got to coding yet. Do you reckon I should complete this little mini-game and then learn to code or after?
Man, I cannot thank you enough. Across all the internet I have searched for someone who could explain where a genuine beginner should start. Not only that, but you've taken the few extra minutes on your end to save me hours of searching for that stuff. If TH-cam had awards for comments, you'd have just got one from this old chunk of coal.
I'm 13. I started programming 2 years ago, inspired by some 'Fake/Harmless virus' Visual Basic Script videos. I was used to program these type of scripts for a year, at least, and programmed some fun stuff, for example a simplified personal assistant. Then I was amazed by the Java language, first it was hard to learn, but I watched a lot of videos (The strategy to learn a language is easy: write a lot of codes, then after a while you'll understand it), wrote a lot of source code and now I can code in Java. C# is easy for me, because it's a reformed version of Java. I think learn a lot of languages, then you'll can get a nice job!
This is so well put together, thank you! I'm coming from a programming background wanting to create games, and my head just exploded with possibilities.
I've been developing on Roblox for about two years, but this looks awesome. The code seems rather familiar, and I also have some C++ experience. Can't wait to watch the next video!
For any beginner programmers, I'd like to make a case for using space instead of tab: What the TAB key actually does is it inserts a tab character. The tab character essentially pads empty spaces onto whatever text you're writing. Here's the thing, these tab characters are pesky and are treated differently depending on the program reading them. These include editors which means the code will look different depending on the editor style used, so one problem tabs cause is that the code may look neat and pretty on your editor but on your coworker's system it may look abysmal. So if you want to use tabs and then some spaces to align certain code, (as an aside you should never mix space and tabs, if you decide to use the inferior indentation tool that is tabbing, FINE, but DO NOT MIX IN SPACES) the code may look aligned on your editor setup, the code could be all over the place on someone else's computer. A space is for sure a single space, whereas depending on the editor a tab could be 2,4,8, or even 3 spaces. Okay, but what if I'm too lazy to press a bunch of spaces? Well, you're in luck, most modern code editors and IDEs let you remap the TAB key to instead insert spaces instead. So from your point of view the TAB key works the exact same, except instead of inserting pesky tab characters they insert spaces. ,If somehow your editor doesn't let you do that you need to change editors, even dinosaur-aged tools like vim and emacs have those capabilities now.
Hands off to you dude, as a python programmer I found C# very hard, these tutorials have helped me a lot man ❤️, Its a shame that you stopped making videos 😢.
Okay, guys if you are on Windows I can help you out: 1. for those who are having trouble going to Visual Studio, this is what you do: Make sure Visual Studio is on your desktop. If it isn't, you must download it. Then double click on "PlayerMovement". Not the title! The one below it. 2. For those who are having trouble with Rigidbody I can help you. Make sure to copy this: using UnityEngine; public class PlayerMovement : MonoBehaviour {
public Rigidbody rb;
void Start() { rb = GetComponent(); } void FixedUpdate() { rb.AddForce(0, 0, 2000 * Time.deltaTime); } } This is what I can only fix! IMPORTANT EDIT: I have found something that breaks Unity, don't delete everything on your script, only delete the ones below "public class PlayerMovement : Monobehaviour" then paste "public Rigidbody rb;" to " rb.AddForce(0, 0, 2000 * Time.deltaTime); } }" If you delete everything and paste everything, it wouldn't recongize MonoBahaviour and Rigidbody.
man u have to download vscode or visual studio thats all . Then go to preferences in unity and choose vscode or visual studio thats all u are now done!
Someone in the comments here said how to link Unity to Visual Studio, which is a fundamental step to make the editor work. The procedure on Mac is slightly different. If you guys are programming on a Mac, you might run into a few more issues! If Visual Studio isn't working like in the video, here's what you can do: 1. Do everything Benjamin Kvist said below and set Visual Studio as an External Script Editor in Unity. You can do this in Unity -> Edit -> Preferences. 2. You might still run into some errors, such as "Some projects have trouble loading. Please see output for more details." You most likely need to install .NET on your Mac. You can do that from here: dotnet.microsoft.com/download 3. But, because the .NET Framework isn't available outside of Windows, you'll need to install Mono as well. Go to www.mono-project.com/download/stable/ and grab the latest release of Mono. 4. Restart Unity AND Visual Studio, then open your C# script straight from Unity. The editor should now show Intellisense, syntax suggestions and more, including red highlights when there's an issue in your code. Have fun!
Took me like 105321 years to get visual studios working. "30-day period has expired???" "Please log in with microsoft" "Password incorrect" "Password incorrect" "Forgot password" "Code has been emailed" "Your password has been changed successfully" "Password incorrect"
@@kuma7021 hey. Yeah I did all you gotta do is download it from Google type up "visual studios" download a version and go to a entry unity project and make a c# script once that's done double click the scrip or press edit script and choose what app you want to view the script in (visual studios) and you'll get it! It's very useful after you've done it!
remember that this guy who is teaching us all of this was just the same as all of us when he first decided he was going to try coding,,,,everyone starts somewhere so please remember to not give up!!
Some updates that works for me [1] Creating Script Right click on your `Project Window> Asset Folder` and select `Create> C# Script` Once created, you can now drag it to your player object. [2] Intellisense/Autocomplete Not Working on my Visual Studio Go to File > Preference > External Tools > External Script Editor>Microsoft Visual Studio *by default you may see that open by file extension is selected thats why autocomplete/intellisense is not working.
I just spent half an hour giggling to myself while I stacked up red cubes into pyramids and smashed a different red cube into them over and over again like a small child playing with blocks. My wife is not impressed. But i had fun.
I know no one will see this but the amount of joy i had when i got hello world to show up in console was huge i had been trying and trying for over a 3 month and it finally worked, I literately started crying
//possible colsion code using UnityEngine; public class MyCollisionScript : MonoBehaviour { void OnCollisionEnter(Collision coll) { Debug.Log("Collision with: " + coll.gameObject.name); } } //needed collision using UnityEngine; public class colision : MonoBehaviour { public movement Movementt; void OnCollisionEnter(UnityEngine.Collision collisionInfo) { if (collisionInfo.collider.tag == "obstacles") { Movementt.enabled = false; } } } //movement left and right 3d using UnityEngine; public class Movement : MonoBehaviour { // Start is called before the first frame update public float fowardforce = 2000f; public float sidewaysforce = 500f; public Rigidbody rbg; void Start() { } // Update is called once per frame void Update() { rbg.AddForce(0, 0, fowardforce * Time.deltaTime); if (Input.GetKey("d")) { rbg.AddForce(sidewaysforce * Time.deltaTime, 0, 0); } if (Input.GetKey("a")) { rbg.AddForce(-sidewaysforce * Time.deltaTime, 0, 0); } } } and heres a bunch of code that can help
It's misleading, or let's say oversimplified to say Start() runs when you start the game :P It runs when the Gameobject that the script is attached to comes into existance, for example the game is already running and you instantiate an object with that script on, the Start() function is executed once.
for someone who hasn't coded in java, C#, or another OO langauge, it would probably be confusing for them. I know java though, so i learned this pretty easy.
if anybody was wondering to get the rb to work you have to drag the script in the cube or the rigid body into the cube or something like that worked for me hope this was helpful
Thank you sir. You are of the essence of Pixar’s Up. By that I mean you are wonderful. Have a good day, and try not to slip over a banana peel. Godspeed.
The problem occurs because Visual Studio Tools for Unity is not installed. You all can refer to these websites to solve the problem: stackoverflow.com/questions/42597501/autocompletion-not-working-in-visual-studio docs.microsoft.com/en-us/visualstudio/cross-platform/getting-started-with-visual-studio-tools-for-unity?view=vs-2019
if you already have Visual Studio, another comment said this: in unity you should go to: > Edit > Preferences (click) > External tools(click) > external script editor > choose visual studio
I think you are doing a greate job explaining things, but it's almost like you are in a hurry. im having a hard time following ur steps and often have to jump back 5-10 seconds!
It messes with the audio a bit, but I set the playback speed to 0.75 for this exact same reason, and it’s easier to follow. Anything lower and we get BrackeysMolasses.exe xD
These tutorials are better than paid ones on Udemy
The irony is that in every video i get an add for paid tutorials on Udemy lol
That's because anyone can make a course on udemy, so you'll get a lot of crap on their, there are some high rated ones though, and they explain a lot more than brackeys does in this video, that might be confusing to complete beginners, this is a good one udemy.com/unitycourse or udemy.com/unitycourse2
Well to be fair, anyone can make tutorials on TH-cam.
Nathan Cox Exactly, that's why you also find a lot of crap on youtube.
I got an ad for udemy
"Hello, World !"
The beginning of a never ending nightmares
i can't add the rigidbody at 3:50 how did you did it?
@@thijslumeij i am having the same issue.
@@thijslumeij did you type it usung a big letter at the start or not? cuase if not , theres the problom
Since I am a man of class I put hello there.
BIG TIP WATCH THE VIDEOS WITH OUT DOING THE THINGS IN THE VIDEO ON TIME FIRST SO SOME OF THE CONCEPTS ARE A BIT MORE FAMILIAR.
dude. I was legit so excited when I made the box jump forward! lol even called my wife in to my office "babe! come check this out!" needless to say she was not very impressed lol
SAME!!!
@@DoctorNoobGamingYT LOL
Well when you're just starting out you get happy about the smallest details which is good.
She was probably like mehh
This comment was 7 months ago how far have you gotten now? im curious.
can't wait to get to the best part, *UNITY'S PARTICLE SYSTEM*
Oh your wondering what Karlson is?
@@xmgamer5672 Its just a game Dani is working on.
@@digvijaysingh5290 its like the 15th most wishlisted game on steam, lets get to #1 GAMERS
SIPS MILK:
REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
So slap wishlist now GAMERS
Buy milk
For those using this as a reference or wanting to review specific parts of the lesson, here are some timestamps of interest:
0:14: Creating a Script.
1:15: First look at C# code in Unity.
2:03: Printing to the Console (using the Start method).
3:33: Changing the value of a component through code to turn off gravity.
4:54: Using function arguments to apply force to a Rigidbody
5:40: Applying force over time (using the Update method).
6:27: Making your code frame-rate independent with Time.deltaTime
8:11: Physics Best Practices: using FixedUpdate
8:37: Writing comments to make your code easier to understand
You are a good man. Thank you.
Man of honor
10:11 realizing the video has ended
Thank u
My Brother Will
I'm a game artist for 4 years now, wanted to learn a bit more about the whole process of making a game and dip my toes in. I was following a course on udemy, was getting totally lost had no idea how any of it worked, saw a comment recommend this channel. Wow, so much better! you explain everything so well and in a logical path I already understand more in 30 minutes than 5 hrs on that course. Thanks dude!
same here. Which course did you try on Unity?
mans explaining coding better than college courses lol
For Visual Studio 2019 I had issues with getting IntelliSense(Auto Complete) to work with unity. To fix this I closed Visual Studio, went to Unity then Edit -> Preferences -> External Tools -> External Script Editor. Set it to Visual Studio (your installed version of VS). When I re-opened Visual Studio by double clicking the script, everything then worked.
Thank you so much I was having so much trouble ur a life saver.
Really helpful comment, Thank you so much
Thanks! That's exactly the comment I've been looking for! :D
You're the hero no one asked for but everyone needs
thanks man it works !
To anyone new coming in and being confused like I was:
In the beginning he adds a new component, a script, and chooses the programming language. You probably won't see the option to pick a language. Since he made this video, it has changed and now C# is the only language unity uses, so you don't have to worry about that, just create a script and follow from there!
The script doesn't work tho
using UnityEngine;
public class PlayerMovement : MonoBehavior {
// This is a reference to the Rigidbody component called "rb"
public Rigidbody rb;
// We marked this as "FixedUpdate" because we
// are using it to mess with physics.
void FixedUpdate ()
{
rb.AddForce(0, 0, 2000 * Time.deltaTime); // Add a force of 200 on the z-axis
}
}
Thank you so much! I spent hours trying to figure this out!
i love you
This is a really well made tutorial. Videos like these really help make unity and C# seem less intimidating. I haven't found a Unity tutorial nearly as good as this one, and i'm really glad that I've found it.
Thank you for making this.
This tutorial is also great for brushing up on old skills without too much fluff.
You know a programming tutorial is going to be good when it starts with Hello World! xD
but what if it starts with Yoylecake
alie
Yea,
Every single tutorial I've ever learned had Hello World. So who started this? I've been a developer for 35 years and it was before my time. ;P
@@GaryParkin Brian Kernighan and Dennis Ritchie: in 1978 en.wikipedia.org/wiki/The_C_Programming_Language
"The image refreshes multiple times per second!"
My potato laptop: Haha no not doing that
69
@@ifusubtomepewdiepiewillgiv1569 haha funny number
So true
my gaming PC can do it ten times fast
@@pinkishpenguin6799 ok
You're so freaking wholesome. So glad you made this series, happy to have found it!
"We can see that everything looks fine, but there's one problem."
Any programmer will resonate with this sentence. If you think it works the first time, then the code is lying to you.
So true xD
The referenced script (Unknown) on this Behaviour is missing! IT IS COMIN WHEN I AM WRIGHT public Rigidbody rb;
@DanielUlrich Ramos I guess its programmer instincts? i never realized i capitalized it
@@shreydaga7918 bro fkin samemeee
Using the while loop...oh my god
I am an intermediate unity user, but I watch these videos. I ADMIRE BRACKEYS
Me2
I've been programming for 8 years now and I laughed when he said "a lot of scary stuff here" :P But I really don't know how to use Unity lol
Zxios I can't get the rigid body rb; part to work can you help me
@Frost Bite. If you have the reference typed out like you have it above then I see 2 issues, first you have a space between the words rigid and body, it is written as just one word. The second issue is capitalization, when creating a reference to a rigidbody you have to capitalize the R, so it should read public Rigidbody rb; (notice how public is not capitalized but the R in Rigidbody is capitalized)
If you do have this typed out properly then my next guess would be that you have not dragged the rigidbody component into the inspector.
both of these problems would flag an error in your console. if you get an error that says "Unassigned Reference Exception" this means you need to drag the component into the inspector. If your error reads "PlayerMovement does not contain a definition for "rigid body", it means that you have incorrectly typed out the public Rigidbody rb; in your script (for this example anyways).
I hope this helps :)
how old r u?
Me: ok so this should work when I press play, right?
Unity: The most i can do is 999+ errors
lol same with me
Same wtf
@ARYA RASOOLY Damn thanks, I was wondering what I did wrong.
@ARYA RASOOLY thanks dude
@ARYA RASOOLY OMG thanks dude you just made me realise how much of an idiot i was being
6 years later and still ur the best sad that you leave but i will continue to learn from you
I like how u don't give a dope dubstep remix track after u say lets jump right into it
OH MY GOD GUYS WILL IT WORK?!??!?!?!??!??
I very much agree with this sentiment
this person who made these tutorials is really good at explaining how everything works i would recommend this to one of my friends
If your game looks ugly press "Auto Generate Lighting Off" in the bottom right corner and in "Enviorment Lighting" Click "Source" and Change it to your liking!
.
Please like if this was helpful!
For more details if you want it exactly like brackys':
choose color and make it white
Thank you for your comment Jaxon very helpful
Help me how to save everytime when you write something in Microsoft visual studio and go back to unity
@@neerurathore8969 press ctrl and s
or at file and then save
@@yahiaghadiry9885 thank you!
@@neerurathore8969 You are welcome.
now that i have started coding nothing makes me more happy in life than finally after 5 hours fixing a bug in my code in unity
You’re a fantastic teacher, dude.
This was more informative than a whole year of programming in school
"Physics determined by frame rate? That's not a bug, it's a feature." -Todd Howard
so true
-Robtop games
-tf2 devs making demoknight
It just works
I think the reason is that C# is not necessarily built for Unity and function could be used in other ways rather than limiting it on Framerate
Hands down the best unity tutorial out there
I recommend Fallout 76 developers to go through this video and learn about Time.deltaTime.
Bethesda
haha
No kidding.
Remember though at the time this tutorial was posted Time.deltaTime was relatively new...
fax
*me having problems with the cube going backwards*
*adds a negative sign and it works*
me: i got big brain
hihi mine is not moving
what if....
*you were looking backwards*
Hey please help sir the hello world dosent appear on console
It says rigid body dosent contain a definition for user gravity
lets go theres a 2020 boy here
Episode 1: Wow I'm so good! Game design is so simple!
Episode 2: Hello darkness my old friend....
it is pretty easy you'r brain is shit
@@prathampawan8199 Chill out
hehe yeah
@@prathampawan8199 I find it quite difficult :/
@@prathampawan8199 Wow you're a dick aren't you?
Thank you, Brackeys for doing these. I also started making games (my first was the control system for a fighter jet in a flight sim I made) in the game and physics engine in Blender. And now, partly from you, I'm learning C# and Unity. Thank you again.
For those ones using Visual Studio Community and your code doesn't auto complete while typing or you don't see code suggestions:
Go to Unity >> Edit >> Preferences... >> External Tools >> Change "External Script Editor" to Visual Studio Community.
I'm a beginner and had a hard time figuring this out. Hope this helps. Happy Coding! 😊
oh my god, you're a saint tysm
thank you
for anyone having trouble with anything with the Rigidbody use
rb = GetComponent();
at the beginning of the void start()
thanks
this shit helped alot. But can't understand why this only
public Rigidbody rb;
doesn't work for me
thanks, this must be like making an instance of a method, i've only have coding experience in java and python. Why didn't he include this in the video?
Thank you so much
Thanks
please, people. if something doesent work, first check that you dident miss anything in the tutorial. its easy to go on autopilot when watching tutorials.
you actually make programming alot more fun with ur voice, unlike other people
5 years old and it still holds up great
When it said “Hello world!” In the console for me I said... “YEEEEEESSSSSS!!!!” But hay, when you don’t know how to code and something works you have to celebrate the little things.
Yay, I am following the directions right!
You and me both dude xD when I got that to work and with the deltatime, I spent more time doing victory dance than actually looking at the video to recap xD
I literally did everything right and it won't wooorkkkkkk 😂
Same here,cube falls but no Hello World. checked and rechecked, everything appears correct. ????????
Nothing wrong with celebrating your first line of code. I Still remember my first time typing print("Hello World") in lua. IT WAS AMAAZIIIING
Lol it's just a debug log
("Hello, World!")
E R R O R
@Holden Jordan sure I'll tell you if it worked.
@The Void thanks I was so confused
@The Void Lol so it's Debug.Log("Hello, World"); with the;
thx
@@radkocodex1033 you just ruined like that snit
R.I.P game
I would gladly watch ads in these videos to help you earn money, but having no ads is awesome too!
Man, these videos are really good made! it explains well how the basics (so far) of coding and programming works. If it is fine by you, I will refference this playlist in my research for school, where I look what I can do with unity for the first time. Thx to you, I got into unity :)
I would be honored! Glad you like them :D
Sander Koldenhof q
when you did the rigidbody after public it did not work can u help me
@@jaydenrachal1655 fr it didnt work for me either
You had me in the first episode, not gonna lie
Same bruh I hate programing
@@WxckyPenguin programming is fun lol
@@karolingston true, programming is like a dark cave but with jewels inside, you can get stuck, and it's hard to get out sometimes but in the end...
you die of the errors you are getting
Lol, i didnt even tryed it yet
@@karolingston PorRogRMMAInaG I S SOO sFUUFnf jNn! true but its not
wait so you're telling me fallout 76's speedy glitch where you go faster the higher your framerate, could be fixed, with *just Time.deltaTime!?*
Yeah, big brain ( ͡o ͜ʖ ͡o)
@@Shaadwz when i learned fallout 76 was made by a rookie team at Bethesda, I didn't realise they were talking about REALLY rookie
@@goose4262 Well they didn't put the time /effort in this game (Same texture, same glitch). That's why it's a absolute mess
The game wasn't made in unity so... no
@@larsderoover Yeah but I'm sure their engine has an equivalent to that. It's most likely just not called Time.deltaTime
I’m crying-
Thank you so much for making an understandable tutorial for programming! It makes developing games actually seem possible!
(If it would actually work)
void start()
{
Debug.Log("Awesome Video Really Helped Me Alot. Thanks");
}
By the way, it needs a capital S for start
@@olivenest Wow ok I'm gonna need a lot of time to learn all the capital or non capital words
@@loptheflop9615 same lol
@@olivenest You have saved me
Learn them like the scps, when you use them for long enough you remember them
Omg this dude is goat (greatest of all time). he made my family and software engineer dad proud! thanks tons :)
Best game programming on TH-cam.
I'm a beginner in both game making and programming. You made this really understandable, and now I'm excited to get back into making games! :)
Can u tell me how u improved in these 10months now, if u continued ofc
@@1nterlinked_ Nice try, Russia!
@@zeeba3999 ? I asked a question ??
@@1nterlinked_ was making a joke based on the name, mate. Apologies - sadly new work situation and dealing with a death in the family (plus all the paperwork involved) hasn't left me much time for hobbies, much to my disappointment.
@@zeeba3999 oh ok, sry, hope it gets better for u
for anyone who has problems unchecking the use gravity by the code make sure you have dragged the rigidbody component into the script's rb part. it only works after you have done that . i had the same problem too .
Can you explain this a bit more?
@@chrishillin9463 look at 4:00 - 4:16 in the video and you will see him do it were he dragged the rigidbody component into the script's rb part
im bad at explaining but hope this helps
I'm having trouble even getting rb to appear. Got any idea why?
Thank you so much!
Brackey:”Let’s enjoy our results” Becomes quiet and watches the cube slowly roll away lol.
I'm really enjoying the videos so far. Usually on most tutorials it doesn't explain very well and just doesn't work. I only had one bug which was when I was constantly trying to move the block forward and I couldn't get it to work. After 5 minutes I realised I wrote RB instead of rb.
I'm going to say this without wanting to diminish the merit and quality of this tutorial series (which is great), OR without wanting to hinder anybody trying to get into making games without learning programming first, because a lot of great indie game designers and developers are not programmer at heart. But I now truely believe...you won't drop learning to make games that easily if you learn coding first, especially to really get what's going on here with Unity.
Like I started making my little 2D projects on GMS1.4 and RPG Maker (I'm way more a 2D character artist at heart) almost ten years ago, never finished one, and the barrier of entry was way lower than this. I had other stuff to do, but also, I got frustrated with every technical issue. I remember already getting stuck four years ago on GMS because It was hard to code a script for a typewriter effect on text display (like dialogues and whatnot) and feeling very disheartened by the fact that I just didn't understand the videos explaining how to do that. All because going through an array or a string using indexes, or for/while loop were not things I took interest for beforehand.
Since then, I became a webdev (fullstack JavaScript) and for my new job, I need to learn C# and .NET. And WOAW. Unity is way simpler than I thought it would be. Thanks to the quality of the tutorial, YES, absolutely. But also because I spent 45 hours the past week learning the basics of C# for a maintenance job, AND I already have a training in development (only six month okay, I'm not a computer engineer).
So just a piece of advice, for those who can afford a little time on the side: learn just a little programming and C# syntax before getting into Unity. You'll see, you will be way more at ease, and there will be less chances of you dropping this at the very beginning of this great tutorial series.
Go on France.ioi (www.france-ioi.org/index.php?sLanguage=en) select any language (preferably Python that has a pretty simple syntax) and do the first 50 exercises; it will wake up a little bit of Math and it'll teach you the two or three tricks that you will need to use constantly (the loops, if statements, types basically). If you want more of these, go to Codewar and do level 8, 7 and 6 if you can.
And also, go to Brackeys C# basics (th-cam.com/video/N775KsWQVkw/w-d-xo.html), go to CodeCademy and do the first two or three modules explaning the syntax of C# (www.codecademy.com/learn/learn-c-sharp) even though not everything will be useful for Unity, you'll understand the basics of strongly typed language and why certain declaration of variables will look like you are stating the same thing thrice...
I know it doesn't look like a lot of fun at first, but I promise it's worthwhile, and all these ressources are free! I wish someone had showed me that years ago, I would've probably be a webdev for years now, and maybe a gamedev too...
Have fun making games!
You are 100% right. I have been coding since I was 10 years old and coming into Unity is still daunting. If I wasn't an experienced (amateur, to be clear) programmer already this would be too overwhelming. If I didn't have a grasp on basic programming concepts/problem-solving skills/data structures/etc etc etc... this would be a pretty silly thing to try and learn. I'm embarrassed even looking at my code from three years ago
It makes me sad to think how many creative people are out there who want to make a game but just let it die because they bite off too much at once. The ONLY way to get good
at coding is to start small :/
Hey thanks for the advice just started with unity watched ep 1 and havent got to coding yet. Do you reckon I should complete this little mini-game and then learn to code or after?
Man, I cannot thank you enough. Across all the internet I have searched for someone who could explain where a genuine beginner should start. Not only that, but you've taken the few extra minutes on your end to save me hours of searching for that stuff.
If TH-cam had awards for comments, you'd have just got one from this old chunk of coal.
I just want to say that these tutorials are, so far, really helpful as I have experience in C and it's, so far, the same as C#;
Me wanting to create a normal game: TH-cam come here I need help. Me after figuring out I can send cubes to kick the fcking sun in unity:this is fine.
Thanks for this playlist. I watched many videos for learn unity but you are amazing teach unity c#
I'm 13. I started programming 2 years ago, inspired by some 'Fake/Harmless virus' Visual Basic Script videos. I was used to program these type of scripts for a year, at least, and programmed some fun stuff, for example a simplified personal assistant. Then I was amazed by the Java language, first it was hard to learn, but I watched a lot of videos (The strategy to learn a language is easy: write a lot of codes, then after a while you'll understand it), wrote a lot of source code and now I can code in Java. C# is easy for me, because it's a reformed version of Java. I think learn a lot of languages, then you'll can get a nice job!
Yoloxer HUN
Wait. Was learning Java that hard?
well good boy , keep it going, I wish i had started from much earlier, you are on your way to success
C# and Java aren't that similar at high levels
Im 11 I started programming at 9 and I got inspiration form the same fake viruses
I'm 17 and still learning how to do code . I stated late I guess.
This is so well put together, thank you! I'm coming from a programming background wanting to create games, and my head just exploded with possibilities.
I've been developing on Roblox for about two years, but this looks awesome. The code seems rather familiar, and I also have some C++ experience. Can't wait to watch the next video!
this is c# tho
THanks man you have made such a brilliant series for beginners ,appreciate your hardwork
For any beginner programmers, I'd like to make a case for using space instead of tab:
What the TAB key actually does is it inserts a tab character. The tab character essentially pads empty spaces onto whatever text you're writing. Here's the thing, these tab characters are pesky and are treated differently depending on the program reading them. These include editors which means the code will look different depending on the editor style used, so one problem tabs cause is that the code may look neat and pretty on your editor but on your coworker's system it may look abysmal. So if you want to use tabs and then some spaces to align certain code, (as an aside you should never mix space and tabs, if you decide to use the inferior indentation tool that is tabbing, FINE, but DO NOT MIX IN SPACES) the code may look aligned on your editor setup, the code could be all over the place on someone else's computer. A space is for sure a single space, whereas depending on the editor a tab could be 2,4,8, or even 3 spaces.
Okay, but what if I'm too lazy to press a bunch of spaces? Well, you're in luck, most modern code editors and IDEs let you remap the TAB key to instead insert spaces instead. So from your point of view the TAB key works the exact same, except instead of inserting pesky tab characters they insert spaces. ,If somehow your editor doesn't let you do that you need to change editors, even dinosaur-aged tools like vim and emacs have those capabilities now.
Okay... Here have some chocolate for ur hard work 🍫
Appreciated but not really much of use :D
Him: You will use visual studio
Me: Using Notepad
Same lol
me to but it says error in the concel
when i still i used a mac i used textedit lol it is like notepad but with dark theme lul
Download Visual Studio it's free and the best thing u will ever do
@@jaxonplayz6256 same to me if u find help me
Hands off to you dude, as a python programmer I found C# very hard, these tutorials have helped me a lot man ❤️, Its a shame that you stopped making videos 😢.
ikr. also u got a c+p link or something for this cos like i have little to no time to watch it and copy the code
Brackeys is the GOAT
I was really worried that the coding wouldn't work since I have to use something else, glad it all went well.
For 2019.3+ versions of Unity the Debug.Log("Hello, World!"); is replaced by
UnityEngine.Debug.Log("Hello World!");
It's still working for me 🙄
@@breeze2440 nice
Debug.Log seems fine on mine too.
@@Galdethriel hm, im using 2019.3.12f1
@@skyrym I found what's going on here It didn't work for me too when I forget to remove
using system.Diagnostics , it's in first upper lines
If you 're using this tutorial with last version. you ll have to put this:
UnityEngine.Debug.Log ("message")
instead of Debug.Log
thank you.
I love you
and if thats doesnt work??
@@forward8204 i suggest to copy the problem exactly and directly to the google bar, thats what i did
@@forward8204 You need to attach the script to a game object or else the script will not activate.
Okay, guys if you are on Windows I can help you out:
1. for those who are having trouble going to Visual Studio, this is what you do:
Make sure Visual Studio is on your desktop. If it isn't, you must download it. Then double click on "PlayerMovement". Not the title! The one below it.
2. For those who are having trouble with Rigidbody I can help you.
Make sure to copy this:
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
public Rigidbody rb;
void Start()
{
rb = GetComponent();
}
void FixedUpdate()
{
rb.AddForce(0, 0, 2000 * Time.deltaTime);
}
}
This is what I can only fix!
IMPORTANT EDIT: I have found something that breaks Unity, don't delete everything on your script, only delete the ones below "public class PlayerMovement : Monobehaviour" then paste "public Rigidbody rb;" to " rb.AddForce(0, 0, 2000 * Time.deltaTime);
}
}" If you delete everything and paste everything, it wouldn't recongize MonoBahaviour and Rigidbody.
The code got like 30 times more complex than before
@@dr4876 nah only 1 line more and that is rb getcomponent.
How tf do you make rigidbody a component
Ty I'll try it
Donerank
L
I love your tutorials man thank you so much. It honestly helps a lot and the way you speak is so easy to understand.
Cool tutorial, but the Udemy commercial is seriously start to annoy me >:(
Edit: And now the Code Monkey! D:
ublock origin works great lol most ads dont come through
Devious Devin right and he makes no money, use your morals brother
improbable.io
Chris Kavanagh thats not a liveable wage boi
just report the commercial as irrelevant lol
Episode 1- OMG, Im so good!
Episode 2-Dosent know how to download the script writer...
You can use atom or even notepad.
man u have to download vscode or visual studio thats all . Then go to preferences in unity and choose vscode or visual studio thats all u are now done!
@@visaganixa8986 thanks
@@visaganixa8986 you are a life savior!!
@@killaon_ttv8942 i hit the wrong one
Me writing code peacefully and trying to go along with the video
Brackeys: *I AM SPEED*
this man helped me so much i didn't know how to make code right and i watched this one video and all the sudden i got it
Someone in the comments here said how to link Unity to Visual Studio, which is a fundamental step to make the editor work.
The procedure on Mac is slightly different. If you guys are programming on a Mac, you might run into a few more issues! If Visual Studio isn't working like in the video, here's what you can do:
1. Do everything Benjamin Kvist said below and set Visual Studio as an External Script Editor in Unity. You can do this in Unity -> Edit -> Preferences.
2. You might still run into some errors, such as "Some projects have trouble loading. Please see output for more details." You most likely need to install .NET on your Mac. You can do that from here: dotnet.microsoft.com/download
3. But, because the .NET Framework isn't available outside of Windows, you'll need to install Mono as well. Go to www.mono-project.com/download/stable/ and grab the latest release of Mono.
4. Restart Unity AND Visual Studio, then open your C# script straight from Unity.
The editor should now show Intellisense, syntax suggestions and more, including red highlights when there's an issue in your code. Have fun!
AnthonyWolf it’s saying it will take 999.9!space is this correct
d
Took me like 105321 years to get visual studios working.
"30-day period has expired???"
"Please log in with microsoft"
"Password incorrect"
"Password incorrect"
"Forgot password"
"Code has been emailed"
"Your password has been changed successfully"
"Password incorrect"
my visual studios wont even come up. i tried clicking it but it wont come up can you or someone help me with it
@@suj13 i dont even remember what I did but I probably found the answer on some random forum
bruh, i littelary just went thru all that lmao
@@suj13 did you solve the problem? because i have the same problem
@@kuma7021 hey. Yeah I did all you gotta do is download it from Google type up "visual studios" download a version and go to a entry unity project and make a c# script once that's done double click the scrip or press edit script and choose what app you want to view the script in (visual studios) and you'll get it! It's very useful after you've done it!
You are the Ali-a of unity brother TriStars Games thanks you for helping us with your Tutorials
Ps. We are so glad you are not monotoned lmao 😂😄🤣
man i have 0 experience i searched for 1 hour for a good video and now i found like the best of the best video seruios and im just like a 12 y/old
Brackeys: shows me how to do anything
Me after watching 1000 TH-cam unclear tutorials: years of academy training wasted!
Fully agree, this guy is truly amazing!
remember that this guy who is teaching us all of this was just the same as all of us when he first decided he was going to try coding,,,,everyone starts somewhere so please remember to not give up!!
Some updates that works for me
[1] Creating Script
Right click on your `Project Window> Asset Folder` and select `Create> C# Script`
Once created, you can now drag it to your player object.
[2] Intellisense/Autocomplete Not Working on my Visual Studio
Go to
File > Preference > External Tools > External Script Editor>Microsoft Visual Studio
*by default you may see that open by file extension is selected thats why autocomplete/intellisense is not working.
You just saved me from a headache. Thank you.
YOU'RE A LIFESAVER
I can confirm the second one it wasn't working for me neither so I asked my Unity pro friend and he told me to do that.
Totally works 👍
crazy to see how many people are still around here tho
Its under edit, not file btw
I am really impressed with your tutorials. They're easy to follow, step by step, and well organised.
for those of you who cant put rb on the script, you must double click on the script from the player properties not from the bottom screen
Still doesn't work :/
Edit: Make sure to save the code, then it works
Brackeys...
What more can I say?
Better than any Udemy Course, super professional and well representative !
Thank you guys for your efforts !
The pacing is great, TH-cam had this great feature that allowed me to go back in the video if I missed anything. Guys you should check it out!
Im 13 yrs old and this looks very cool. Thank you brackeys. Very Cool👍
I just spent half an hour giggling to myself while I stacked up red cubes into pyramids and smashed a different red cube into them over and over again like a small child playing with blocks. My wife is not impressed. But i had fun.
lmao
Am i the only one 7 years late lol
Nah man I'm starting too. Wanna make my own game.
You halped me a lot with every your tutorial
Blajo ha halp ma alat taa
your grammar makes me believe your a kid
I know no one will see this but the amount of joy i had when i got hello world to show up in console was huge i had been trying and trying for over a 3 month and it finally worked, I literately started crying
Yea the printing isn't working for me either, do you know how you did it?
@@luvyouaugust so are you using vs code the purple one or the blue one when you go into the script editor
//possible colsion code
using UnityEngine;
public class MyCollisionScript : MonoBehaviour {
void OnCollisionEnter(Collision coll) {
Debug.Log("Collision with: " + coll.gameObject.name);
}
}
//needed collision
using UnityEngine;
public class colision : MonoBehaviour
{
public movement Movementt;
void OnCollisionEnter(UnityEngine.Collision collisionInfo)
{
if (collisionInfo.collider.tag == "obstacles")
{
Movementt.enabled = false;
}
}
}
//movement left and right 3d
using UnityEngine;
public class Movement : MonoBehaviour
{
// Start is called before the first frame update
public float fowardforce = 2000f;
public float sidewaysforce = 500f;
public Rigidbody rbg;
void Start()
{
}
// Update is called once per frame
void Update()
{
rbg.AddForce(0, 0, fowardforce * Time.deltaTime);
if (Input.GetKey("d"))
{
rbg.AddForce(sidewaysforce * Time.deltaTime, 0, 0);
}
if (Input.GetKey("a"))
{
rbg.AddForce(-sidewaysforce * Time.deltaTime, 0, 0);
}
}
}
and heres a bunch of code that can help
@@imreallynotfunny4423 nah i mean that i cant do debug.log to print in console
@@luvyouaugust ik i had the same issue thats all thast i can reccomed just enablesd then debug. Log("Hello World")
Please do this series daily, i am really inspired by you :)
It's misleading, or let's say oversimplified to say Start() runs when you start the game :P It runs when the Gameobject that the script is attached to comes into existance, for example the game is already running and you instantiate an object with that script on, the Start() function is executed once.
Well, since the cube was meant to 'fly away' at the moment you start the game, Start() does technically run when he started the game. :)
yeah, but since a lot of newbies might watch this video to get started with game dev it might be a little missleading
for someone who hasn't coded in java, C#, or another OO langauge, it would probably be confusing for them. I know java though, so i learned this pretty easy.
"Theres alot of scary stuff going on here" Me looks back in my closet and sees a monster. The script is still scarier
Thanks. Coding would have been a big nightmare for me without you
if anybody was wondering to get the rb to work you have to drag the script in the cube or the rigid body into the cube or something like that worked for me hope this was helpful
ty u helped me a lot
“public” turned blue but “Rigidbody” didn’t turn yellow.
in unity you should go to:
> Edit
> Preferences (click)
> External tools(click)
> external script editor
> choose visual studio
it happens to me too. Did you solve the problem? Let me know plz how can I fix that
Thank you sir. You are of the essence of Pixar’s Up. By that I mean you are wonderful. Have a good day, and try not to slip over a banana peel. Godspeed.
@@WinBlah Thank you good man
@@WinBlah use monokai colour theme, for vscode
"Hello, World!" the first thing you will code in every language.
doesnt even work
Assets\Move.cs(10,15): error CS0117: 'Debug' does not contain a definition for 'log'
@@arceususedsplash300 Log with a capital L
well, except probably scratch
Thanks, Cap
@@me-specifically say ("hello world") is the first thing i coded in scratch, so no!
thank you so much for this!
it really helps that i love your voice and your accent 🤣 helps me concentrate
this actually helped me more than a course that i paid for 20 bucks lol
Hope this helps someone if you're having trouble with getting the RB to pop up in your script go to assets refresh or control plus R
Me too
Still didn't worked please help!!
Tutorial: "Im just gonna add another zero"
Me: *Adds two zeros*
after like 15 minutes i finally got the first code working. Thanks for teaching for free!
The text in my script doesn’t have different coleurs. Does anyone no why or how to change it?
i too have this problem
me too
The problem occurs because Visual Studio Tools for Unity is not installed. You all can refer to these websites to solve the problem:
stackoverflow.com/questions/42597501/autocompletion-not-working-in-visual-studio
docs.microsoft.com/en-us/visualstudio/cross-platform/getting-started-with-visual-studio-tools-for-unity?view=vs-2019
if you already have Visual Studio, another comment said this:
in unity you should go to:
> Edit
> Preferences (click)
> External tools(click)
> external script editor
> choose visual studio
colors*
Hey all, it’s “Rigidbody” not RigidBody.
Don’t capitalize the “b” in body.
As a JS web developer, that tripped me up.
This is C#
Ari R smh he’s saying since he’s always used JS where you capitalize like that, that he got confused in C#
thanks shaq i couldnt get it!
CyberWolf, I’m not criticizing, I’m just providing feedback.
I'm still having problems getting it to work even by copying his code exactly it's still not working! rb will not appear as one of the components
6:24
That cube player went YEET!
Best tutorial, and I’ve watched a lot of them so far.
I think you are doing a greate job explaining things, but it's almost like you are in a hurry. im having a hard time following ur steps and often have to jump back 5-10 seconds!
opp33 *.
Same here, I had to go back many times. But I ended up figuring it out. XD
He has 30 minutes of content smashed into 10. I prefer that over 3 minutes content dragged over in 10 minutes.
It messes with the audio a bit, but I set the playback speed to 0.75 for this exact same reason, and it’s easier to follow. Anything lower and we get BrackeysMolasses.exe xD
I do the same as AJ, just lower playback speed, way easier to follow and makes him sound like a stoner. Good and good for you.