This Is Why You Can’t Figure Out Programming In Unity! (C# Tutorial)

  Рет қаралды 48,271

ButWhyLevin

ButWhyLevin

Күн бұрын

Go to my sponsor snhu.edu/levin if you’re interested in starting a career in game development!
In this video I go over a bunch of tips and tricks that you can use to learn all about getting into programming in unity. I also have linked to a bunch of sources which you can follow for further learning.
Wishlist Couch Combat on Steam: store.steampowered.com/app/16...
Join My Pateron for an exclusive Couch Combat Beta:
/ butwhylevin
LINKED VIDEOS:
6.Unity C# Tutorial - All About Functions & Parameters
• 6.Unity C# Tutorial - ...
Unity Architecture for Noobs - Game Structure
• Unity Architecture for...
How to use Unity Scripting API
• How to use Unity Scrip...
I Wish I Had Known This Before I Started Unity Game Development...
• I Wish I Had Known Thi...
FIX your BUG much faster in Unity! [Simple tricks]
• STOP Fixing BUGS This ...
My Discord Server: / discord
Get the Game: butwhylevin.itch.io/couch-combat
My Twitter: / whylevin
Chapters:
0:00 Intro
0:36 Basic Principles
4:14 Learning To Learn
4:39 API
5:11 Unknown Unknowns
6:15 Don’t Waste Time
7:42 How To Debug

Пікірлер: 73
@ButWhyLevin
@ButWhyLevin Жыл бұрын
Go to my sponsor snhu.edu/levin if you’re interested in starting a career in game development!
@HoodedOlive
@HoodedOlive Жыл бұрын
One thing I would suggest when learning how to code is if you use a tutorial try and break the code down to try and figure out how it works and how you could use different bits of it for different uses. When I started that was a pretty easy way to find things I didn’t understand so I could go research them and figure it out.
@user-zu1ix3yq2w
@user-zu1ix3yq2w Жыл бұрын
Suggestion 2: chemical enhancements? Might help motivation for all that research
@peanutgamerguy8685
@peanutgamerguy8685 Жыл бұрын
Another great tip for debugging is to use breakpoints in code, allows you to step through code one line at a time. This is a great way to figure out when something breaks, also saves you having to write Debug.Log everywhere in your code.
@SuperDutchrutter
@SuperDutchrutter Жыл бұрын
Good video. Learning how to learn really IS so important. It took a few gos for Unity to really click with me but now I’m hooked!
@monstereugene
@monstereugene Жыл бұрын
I used to want to learn unity but as a kid with free time it’s be better if i learn normal C sharp then unity
@Skeffles
@Skeffles Жыл бұрын
Neat video! Identifying your shortcomings as a dev and learning how to improve is always key. I'd like to suggest looking into automated testing to help your debugging process. Being able to run a suite of tests to confirm everything is working is much faster and easier than having to manually play test. For example if you have a test for your DoExplode function. One test passes in Big explode and one test passes in Explode, you'd find out that code isn't working as expected. After some inspection you'll realise the parameter isn't being used.
@Joso997
@Joso997 Жыл бұрын
Unity tips: Try to use Unity API code instructions as less as possible. You only really need it to interact with the physics engine. Challenge yourself to use the least amount of update calls.
@Joso997
@Joso997 Жыл бұрын
Keep in mind that enter Trigger and similar functions are almost the same as an update. Preferably work without them, use events.
@therealdnold
@therealdnold Жыл бұрын
I mean you probably want the most amount of update calls possible if you look at that way
@Joso997
@Joso997 Жыл бұрын
Don't repeat yourself is a given, but what you really should keep an eye on is a program in a way that the thing you are changing the value of can only be done in one way (preferably a functional pipeline). Following this rule, you will be able to get the complete response from an error, from the point an action originated, through every function it passed through, and what it ended up breaking. Example: Firing a gun can only be done in the Gun script. Once the bullet in whatever way reaches a target, what you want to do is make the health script detect it was shot at, decreasing the object's health. You must not allow the Gun script to access any of the health script properties and you must not allow the Health script to access any property of the gun script. Also, try to use functions for every variable change. Try to not make anything accessible globally, you really don't need global access to anything. It may be easier until you develop a certain way of thinking, it is an old concept that is fine to use in embedded systems but not in any of the new programming languages.
@Joso997
@Joso997 Жыл бұрын
@@kidmosey "If you require the health script to know every type of object or interface that can affect health" It doesn't need to be in a health script, but yeah you should have everything written down somewhere, preferably in the code. Or if you want to change it afterward without building the whole game, in a JSON or similar...
@Connorses
@Connorses Жыл бұрын
This video needs a section on breakpoints. You can literally mark a part of your code and when the debugger gets there, it will help you step through your code and see what's really happening and even peek at the values of variables. It's insanely useful and I didn't know about it for years.
@TriggerWarningStudios
@TriggerWarningStudios Жыл бұрын
Excellent video
@staticplays1871
@staticplays1871 Жыл бұрын
I'm going through the unity beginner scripting for like the 3rd time, and I was wounding. what am I meant to remember, I'm trying to understand literally anything and I don't know how to practice, and I'm worried about forgetting things that i might need to know later and I'm worried that if I can understand what to do, whenever I watch a tutorial, that I will be afraid that I can put my own spin on things or really understand what people are teaching me. so, what do I do?
@gamesbyzeta1434
@gamesbyzeta1434 Жыл бұрын
So, the best advice i can give for this. 1) Don't be afraid of forgetting things. the things you might forget are going to be things you can always google up. there is no punishment other than time spent relearning things. so there's nothing to be afraid of. 2) for learning how to put your own spin on things. rather than following the tutorial directly, what i have done is only look up tutorials for things i'm needing in my current project and looking into how they worked on it. because my systems are different. so i *have* to adjust things. 3) practice is actually quite easy. you remember how math class always started you with the easy stuff and built it up over the year? same thing here. pick a random shitty mobile game that you can think of that has the least ammount of depth you can think of, and just recreate those to start with. and you can slowly build up your familiarity with both unity and c# and by the time you've got like 5-10 of those done, you probably picked up enough to move onto more interesting projects.
@gluckes
@gluckes 10 ай бұрын
here's another simple tip: write your code in a way that a human can understand it. on top of splitting things off for re-use, use proper naming for variables, functions and classes. this way you don't have to traverse the code to see what this dothing(int something) does and why, it's also a lot clearer for others if you ask them for help and show them your code.
@MasterProgrammer423
@MasterProgrammer423 5 күн бұрын
My only problem is finding an actual good video to learn Unity
@jasomega2446
@jasomega2446 10 ай бұрын
6:42 Well said
@Jiovi
@Jiovi Жыл бұрын
I start learning Unity and C# one month ago, and the best way i took to learn, are the gameJams.
@isaacashton5772
@isaacashton5772 3 ай бұрын
Adam C Younis is my best advice
@GabCom888
@GabCom888 3 ай бұрын
You just won a subscriber
@johngrey5806
@johngrey5806 Ай бұрын
Liked, subscribed, and commented.
@amanammer
@amanammer Жыл бұрын
i have given up on learning engined other from scratch since unity dint work for me and it wont let me instal unreal
@ButWhyLevin
@ButWhyLevin Жыл бұрын
Try out Godot, it’s free and really easy to run, and probably the best 2d engine out there
@amanammer
@amanammer Жыл бұрын
@@ButWhyLevin will do! Thanks
@maddoxreuter7404
@maddoxreuter7404 Жыл бұрын
you're the man!
@pirateskeleton7828
@pirateskeleton7828 Жыл бұрын
When looking for bugs, more often than not, if the game was stable before you added a new feature, and now it’s buggy, the bug is in some way related to the feature. This would seem obvious, but…
@leenadhimte3099
@leenadhimte3099 Жыл бұрын
How to identify which code we should use to do what we want in unity
@omle8492
@omle8492 Жыл бұрын
Great video! Sorry bro I had to bring it up. Please use serialized fields. Its sorta bugging me. Sorry!
@Jrej_dev
@Jrej_dev Жыл бұрын
Already a developer so I knew most of that. I use JavaScript and getting into Godot's GDScript though. Code is different but fundamental do not change.
@MusselPump1
@MusselPump1 Жыл бұрын
I would say that when you learn anything with code you should probably stop thinking about the application at first and focus on the idea of what you need, then focus on the application
@neilconz8591
@neilconz8591 Жыл бұрын
Nice pfp
@DevlogBill
@DevlogBill 11 ай бұрын
Hi ButWhyLevin, I think the issues with me isn't programming, been programming with JavaScript and Kotlin for Android for almost 2years now. Made a couple of crappy little projects and now working creating an Android app. Most people aim at creating a ToDo app. But I figured why not try and make a game on Android? As a hobby I would really like to create a 2D action fighting game. But the biggest challenge for me isn't coding the hard part is I can't draw! I figured maybe I could create pixel game character sprites? Or does Unity come with free available characters? Lastly, for Android should I go with Unity or Unreal? Or maybe Godot? Which would you recommend for a simple 2D indie action fighting game?
@ancientbeing9720
@ancientbeing9720 10 ай бұрын
if theres one thing ive learned its that brackeys is THE KEY
@videogamestutorial
@videogamestutorial Жыл бұрын
Why when I update my unity it says error on my game codes
@lightless
@lightless Жыл бұрын
Its important to write relevant, efficient code too. Also only write objects in Pascal Case and in python its snake. In compiler languages its typically camel case. I am doing a degree and i watch the other students write the same code over and over and i die of crippling dispair lol 😂
@a.medition2464
@a.medition2464 10 ай бұрын
bro I have become very very much confused by seeing very much tutorials on my screen. I don't know which video should I watch. I know how to use unity but i am trying to become professional in C# with unity so please help me how could I learn C# UNITY ? PLEASE 🥺
@JonHuhnMedical
@JonHuhnMedical 10 ай бұрын
I inherited a massive unity project on my job that has thousands of lines of code and literally not one line of documentation. My frustration level is through the roof.
@massilyar341
@massilyar341 11 ай бұрын
Can I use python on unity in some way
@jigarpanchal0
@jigarpanchal0 Жыл бұрын
One things i learned is that you can't just learn something just like that let me explain for example you wanna learn scriptable object you go and watch some video and you forgot everything but suppose you working on game and you need scriptable object but you don't know about it so you just type something like how to reduce memory footprint in unity and you'll end up to scriptable object you implement it in your project and you just learned scriptable object in such way that you will be able to use it many time in many other projects you would have understood it very very well
@Aidanryry
@Aidanryry Жыл бұрын
BriefWhyLevin
@HLCaptain
@HLCaptain Жыл бұрын
1:37 you don’t even use the radius parameter…
@kingofroms7224
@kingofroms7224 Жыл бұрын
cool
@staticplays1871
@staticplays1871 Жыл бұрын
How do I use Google. I know I'm not supposed to copy from Google but then how to people use it
@ButWhyLevin
@ButWhyLevin Жыл бұрын
Copying is fine, just try to make sure you know what the code that you just copied actually does
@staticplays1871
@staticplays1871 Жыл бұрын
@@ButWhyLevin ohhhhhhhhhhhhhhhhhhhhh. That makes more sense
@staticplays1871
@staticplays1871 Жыл бұрын
@@ButWhyLevin what if I don't know where to start. Like in not a compleat noob at c# I know the basics like int, float, if statements, and transform.position but I have a hard time puting them into actual practice and making them better at it goes on. For example, I can code basic movement, with the player rigidbody, or their transform but I can't properly expand on to have things like drag, and max speed and double jump. Like I have a vague idea of how to do them. Like if I did double jump I would check key input, and for max speed, I might use a function that adds speed overtime until the player stops things like that but no clear vision.
@HoodedOlive
@HoodedOlive Жыл бұрын
It’s pretty crazy that a university is sponsoring KZbin videos.
@RedCroissantGames
@RedCroissantGames Жыл бұрын
He’s just that good
@HoodedOlive
@HoodedOlive Жыл бұрын
@@RedCroissantGames And now in his next video the entire state of New Hampshire is going to sponsor him as the logical next step.
@RedCroissantGames
@RedCroissantGames Жыл бұрын
@@HoodedOlive nah, you arent thinking big enough not only will this man sponsor himself, so will all 49 us states
@HoodedOlive
@HoodedOlive Жыл бұрын
@@RedCroissantGames there are 50 states
@RedCroissantGames
@RedCroissantGames Жыл бұрын
@@HoodedOlive south carolina isnt real
@general1983
@general1983 Жыл бұрын
JUST LOOK GYUS any one can learn how to code and also any can learn any thing but u just give a tray don't glow in thing if you don't like I don't know why every one say go and learn programming if there is a good person on some thing doesn't mean it good for u just give a tray don't glow also don't fkn sleep
@Joso997
@Joso997 Жыл бұрын
One of my comments got removed 🤷‍♀
@humadi2001
@humadi2001 Жыл бұрын
Is it because of his thumbnail😂
@Joso997
@Joso997 Жыл бұрын
@@humadi2001 em no?
@rawkth5996
@rawkth5996 Жыл бұрын
I feel like you really just want to make an open-world taxpayer game and write your story (and prob everyone's story) about how you struggle with taxes and the "epic" journey it takes to get the money to pay them and just the paperwork in general. lol.
@Project68K
@Project68K Жыл бұрын
I'm sorry, but how does a programmer not know that an API stands for "Application Programming Interface". That should be one of the most basic things any programmer should know.
@ButWhyLevin
@ButWhyLevin Жыл бұрын
Lol
@rawkth5996
@rawkth5996 Жыл бұрын
OKAY advice from a noob for fellow noobs and even devs GET GREPPER for fuck sakes get it most of your problems can and will be solved with it and it's free, like I was having trouble trying to set up a scene swap through a button press code script couldn't find anything that works and boom Grepper instantly gave me the answer to my problem instantly. Like wholly shit I was stuck on this problem for a while and youtube tutorials and even unity API did jackshit for it.
@troyna77
@troyna77 Жыл бұрын
The Biggest Problem in the world is understanding the terminology AND having the terminology remain consistent over multiple sources.
@Greviouss
@Greviouss 6 ай бұрын
Call me racist bigot if you want but do you know who you dont see saying "i cant learn to code its hard" Asians. Let that sink in.
@ashleyriot1805
@ashleyriot1805 4 ай бұрын
This video is 99% filler don't waste your time
@Krullenbol010
@Krullenbol010 3 күн бұрын
No, this video actually teaches you how to learn. Don’t follow tutorials blindly but actually learn the programming language by searching up the api.
@joevaghn457
@joevaghn457 Жыл бұрын
Honestly, I can be empathetic sometimes, but I swear I fail to understand why programming is so hard to some people. The core concepts are so simple to grasp, but maybe people are lacking experience…? I genuinely can’t get it. The only things I find relatively difficult are coming up with solutions to problems or remembering enough library stuff to do what I need. But programming, like understanding the language? Nope. Incredibly easy. I think the ones not getting it are lacking functional experience, as in seeing their code do what the want it to do. They might actually be afraid of errors, but errors are how you learn how to figure out how to do what you need. Errors and mistakes can (typically _are_) the best mentors.
@rr9674
@rr9674 Жыл бұрын
Some of us have never coded a bug dummy
Learn C# with these 9 LINES OF CODE - Unity Tutorial!
25:16
Blackthornprod
Рет қаралды 340 М.
3 Devs Make An FPS - Godot vs Unity vs Unreal || GameDev Battles
12:39
DELETE TOXICITY = 5 LEGENDARY STARR DROPS!
02:20
Brawl Stars
Рет қаралды 15 МЛН
Sprinting with More and More Money
00:29
MrBeast
Рет қаралды 173 МЛН
WHY THROW CHIPS IN THE TRASH?🤪
00:18
JULI_PROETO
Рет қаралды 9 МЛН
2000000❤️⚽️#shorts #thankyou
00:20
あしざるFC
Рет қаралды 13 МЛН
Learning C# In A Week... Otherwise I Fail University
9:04
20 Advanced Coding Tips For Big Unity Projects
22:23
Tesseract
Рет қаралды 158 М.
The Most Fundamental Concept in Unity
9:50
Archions
Рет қаралды 42 М.
Better Coding in Unity With Just a Few Lines of Code
15:27
Firemind
Рет қаралды 301 М.
10 Things You NEED to Be Doing in Unity
11:40
Tarodev
Рет қаралды 125 М.
I Wish I'd Heard These Tips From The BIGGEST Game Dev YouTubers...
11:38
I Made a Roguelike in One Day, but it's UNFAIR
9:45
ButWhyLevin
Рет қаралды 24 М.
How to Start Gamedev in 2024
10:28
Sasquatch B Studios
Рет қаралды 384 М.
I Made my First Game in 24 HOURS
6:04
NathanOnDev
Рет қаралды 967 М.
🪄✨️He Got A Magic Can Of Sprite😃👍🤠
0:33
BorisKateFamily
Рет қаралды 14 МЛН
9999 iq guy 😱 @fash
0:11
Tie
Рет қаралды 7 МЛН
ЗНАКОМСТВА С ЛУЧШИМ ЗЯТЕМ 😂😂 #копы
0:42
Попил😂инст: sarkison7
0:45
SARKISONCHIK.OFFICIAL
Рет қаралды 5 МЛН