Unity3D was my first taste of programming in 2011. Since then I've been obsessed with cleanly organising software. Every game I built in unity was a total mess, so it's great to see this kind of video. PS I'm getting vibes that you've been influenced by Uncle Bob, is that correct?
@zolan42773 жыл бұрын
Best rant ever. I truly hope even 1/10th of your viewers took some of this to heart.
@kyleme96974 жыл бұрын
I've watched a 100 Unity videos now and that Extension Method thing is just the coolest thing. Thank you so much for that specific example. I love it !!
@VgManiac6 жыл бұрын
You suggested reading Clean Code and Code Complete which an invaluable insight to being a great programmer. Thank you for mentioning them.
@jamesh88034 жыл бұрын
Just wanted to say I did find this helpful, thank you Jason!
@freeworld15705 жыл бұрын
I've felt like a mid/advance unity programmer until saw this vid . I looked up again my currently game code project and damn... is a totally mess.. Really thanks Jason! u rocks!
@leakyabstraction6 жыл бұрын
I think you're being way too modest by questioning the usefulness of a video like this. :) What you're showing is honestly light-years ahead the run-of-the-mill Unity3D courses out there... I've seen so many bad practices, but what you show here is really quite clean and nice actually. Must be useful for people who are serious about understanding good software design in the context of Unity projects.
@saqibbro5297 Жыл бұрын
My boii this is super helpful.
@johnl21246 жыл бұрын
You can hold alt+up/down keys to shift the current line up or down. Comes in super handy!
@rafa_guitar6 жыл бұрын
Hi Jason, thank you very much for your awesome videos!
@3dfuture.ledcanvas7 жыл бұрын
This is very helpful for me! Thanks!
@Unity3dCollege7 жыл бұрын
Glad it helps :) Thanks!
@illsaveus Жыл бұрын
Aren’t these scripts just as brittle as before when they depend on a bunch of separate components to work?
@off_pudding4437 жыл бұрын
Can you explain the definition of the float parameters in the With() extension? I understand that the vector3 parameter is what your extending and doesn't need to be passed in, but how are you only passing the y parameter without overloading the function def? I've never seen this before. Does this now require that specific calling syntax? Is there a specific name for this concept? Edit: Nevermind. I found it and I have actually seen it before just never looked it up. In case anyone else is wondering: docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/named-and-optional-arguments
@zORg_alex Жыл бұрын
16:36 A cosmic horror story. Good for a scary story nights for nerds. )))
@ShadowLow254 жыл бұрын
Very very helpful thanks a lot
@oatcube39614 жыл бұрын
Hi Jason, or anyone reading. I've been watching through your tutorials for the past few months. And I got into a point in my game that I really don't know the best way to approach the problem. I posted on reddit also but no replies there either. So I have a story event system in my colony management game. Basically every few months a random event will trigger like "The people want more space to live" or "The people consume 50% less food for next 6 months" and you can choose an option on how to handle it and the game checks after 6 months if you did good with the problem you had. The problem is in implementing the events. Should I create specific class for each of the events, or build some switch/if-statement mess inside one class. Scriptable objects don't seem like a good idea. I also have to take saving and loading into consideration.
@tonygod707 жыл бұрын
One of your best "rambles," as far as I'm concerned. I hate all the code that goes along with making public properties readonly, yet visible in the Inspector, but I understand the reasoning. I also get the thinking on extensions, although I have this nagging thought in my head that the extra layer of abstraction means more files to include and poke through when debugging things. Good on you for clearly making your points!
@Unity3dCollege7 жыл бұрын
Thanks :) I'm with you on the extra abstraction. And that's why I really prefer to just have extensions I've added myself, where I can be pretty sure they're doing only what the name says and nothing else. I've seen others in the past that had unexpected / unintended actions going on behind the scenes and want to avoid that for sure :)
@BlackHayateMX5 жыл бұрын
Amazing Code!
@yousefal-hadhrami78532 жыл бұрын
it would be great if I can copy all of them
@Glubina13100Guitar6 жыл бұрын
What's the difference between the two: 1) public int Score {get; private set;} 2) private int _score; public int Score {get {return _score;}}
@Unity3dCollege6 жыл бұрын
The only important difference is that you can add the SerializeField attribute to the _score field. With an autoproperty like #1 that's not possible. If you're not using the variable in the inspector though, #1 is a bit cleaner.
@martinfinch50116 жыл бұрын
great vid
@germancedres11145 жыл бұрын
This class is already too big , like 140 lines of code. Scripts in my job be kinda: 5000 lines.
@jamesroman54436 жыл бұрын
great vids! please can you use dark themes on visual studio? my eyes will aprecite it!, any way thanks!
@ahbloobloo27845 жыл бұрын
yeah keep them under 200 lines. it's totally doable for 99%+ of the scripts.