C# Design Patterns In Unity - Code Like A Pro
ฝัง
- เผยแพร่เมื่อ 4 ก.ย. 2024
- Master Design Patterns In Unity Using C#
www.awesometut...
Blog
awesometuts.co...
Website
www.awesometut...
Subscribe
/ @awesometuts
3 Day Free Training
www.awesometut...
From Scratch To Game In 40 Minutes
www.awesometut...
Follow Us On Instagram
/ awesome_tuts
Like Our Facebook Page
/ awesometutss
Join Our Facebook Group
/ awesometutsgamedevelop...
#gamedev #gamedevelopment #awesometuts
In my first interview i told my company that i learned from your videos 😍😍. You are my hero
that is awesome! I would love to hear more about your interview, if you are willing to share please send me an email on developer@awesometuts.com
Definitely glad to see there are supporters of the singleton pattern. Always see a ton of people suggesting they're the devil's work or something when it comes to coding haha. If they're used properly it does seem like it's way too useful to pass them up. Thanks for good explanation!
Nice tuts. The first tip in the video is actually called single responsibility principle.
10:55 he starts talking about the patterns. And it's Singletons (yay)
Very clear explanation...
Singleton is sometimes a word that people are afraid to pronounce by don't understand it correctly and now people can see how Singletons are sooooo useful! ( and very easy to use :D )
GG for this video!
Unfortunatley the explenation of why we as devs use patterns is very bad, we don't do it to split functionalities just to make them more robust, easy to understand and easy to mantain, these are just benefits of following a pattern, the main point is to have a set of best practices when encountering a certain problem which occurs often, thus the name "pattern" because you'll have a pattern solution for the problem because it happens often in engineering/dev/architechture/math and much more domains
Eh, it's a good enough explanation for beginners I'd say
so useful tutorials for game dev beginner. thank you!
Nice! This is really needed!
12:46 what happens when you or your team mate decides to set `instance` variable to null somewhere in another script? To avoid this, you'd want your static instance variable to be private and have a private constructor. Then you could have a public function `getInstance` to get your object (and instantiate it if it's null). I hope I'm not being rude but also the things you talk about on beginning are about single responsibility principle, not a design pattern. Design patterns are just standard solutions to common problems in software development. Anyways, I only do game dev casually and I speak based on experience in software engineering so I might be wrong about somethings. You're doing a great job with your YT channel and it's inspiring :)
Thank you for your insight and I understand what you are talking about, but I can't imagine a scenario where I would set instance to null, and why should I do that when I am passing data with it. But yeah I agree with you that it is better to create a private instance and a getter for it.
@@awesometuts I agree with Michal, and when you say you cannot image scenario like that, always imagine scenario where someone could set that variable from outside unintentionally and break app. It is bad practice to expose as public something that should not be..or in this case set public as getter only
@@flyingdutchman2692 I agree that you should make the instance accesible via a getter but I still don't understand how can someone by accedient set a singleton to null especially if he knows it's a singleton used for a specific purpose
@@awesometuts You are looking that from a perspective of a person who wrote that code and understands everything that is going on, and that this is not a complex case. I have seen various cases through years of programming, and even most experienced developers create errors. C# variables shouldn't be exposed as public if they are not properties. I can agree that this is not such a big deal, just saying...if you see publicly exposed variable, that must be something I can write to....or not?
I also wanna say that I am watching your course on Udemy and I like it...Just so you know I don't only complain :D
Not to sound crazy. But your academy is sounding juicier and juicier. Soon, I hope I can enroll!
Hope to see you inside B-)
7:25 - hey, comments in code are not a bad practice in general, of course some will say that it is and will stick to it, but it's more of a opinion that might apply somewhere than a general rule. Good comments when they are needed is a good practice. Imo you shouldn't tell your students not to use comments ever, especially when you target your stuff for beginner level.
Great tut
Thank you, sir.
Loved this 😍
excellent!✨
Cool video
Really Good!
great content as always, keep it up ;-)
So I guess going the modular architecture route is what is being implied here. I guess in very large mission critical applications this would be hell because it would lead to a lot of abstraction in code, but a game is no where in the importance of time sensitive applications so I guess this is all OK.
First 🔥🔥
Hi so I saw the video and is interesting. A way that I use to avoid Singletons is to use scriptable object. You can create a scriptable object where you put the data that need to be passed between scenes and doing this I use Singletons very very few times even in "big" games
but you still need to access the scriptable object from other classes, right?
@@awesometuts yes
@@lorenzoconsoli1916 Thats not suitable for big projects, using that will cause in "LOADS" of SOs as well as having to keep track of which is what etc etc.
Unity Projects have done that and many people are following their Pattern but before doing so, everyone should know "WHY", not just use it
Sir I want to buy your course 🙂
Have you teach game development with unreal engine C++ in your academy ?
yes I do, I have unreal with blueprints and C++, and I am currently working on more unreal engine c++ content.
@@awesometuts I'm comfortable with C++ because C++ is industry game development language
and I have made few games with C++ and as you say that your course have C++ content that is biggest advantage for me 🙂
Hey someone knows how to make rolling template multiplayer in unreal engine
Can I get Game Development job outside India?
yep
thanksss
to bad that unity is stupid