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

ความคิดเห็น • 45

  • @usamabinabid3077
    @usamabinabid3077 2 ปีที่แล้ว +4

    In my first interview i told my company that i learned from your videos 😍😍. You are my hero

    • @awesometuts
      @awesometuts  2 ปีที่แล้ว

      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

  • @stealthyshiroean
    @stealthyshiroean 2 ปีที่แล้ว +9

    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!

  • @carlabalos3884
    @carlabalos3884 2 ปีที่แล้ว +3

    Nice tuts. The first tip in the video is actually called single responsibility principle.

  • @darcking99
    @darcking99 10 หลายเดือนก่อน +1

    10:55 he starts talking about the patterns. And it's Singletons (yay)

  • @studiothink81
    @studiothink81 2 ปีที่แล้ว +3

    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!

  • @VaseaDLoL
    @VaseaDLoL 2 ปีที่แล้ว +3

    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

    • @np9703
      @np9703 2 ปีที่แล้ว

      Eh, it's a good enough explanation for beginners I'd say

  • @GameEndorphins
    @GameEndorphins 8 หลายเดือนก่อน

    so useful tutorials for game dev beginner. thank you!

  • @AlexGorskov
    @AlexGorskov 2 ปีที่แล้ว +1

    Nice! This is really needed!

  • @michalrv3066
    @michalrv3066 2 ปีที่แล้ว +4

    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 :)

    • @awesometuts
      @awesometuts  2 ปีที่แล้ว +1

      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.

    • @flyingdutchman2692
      @flyingdutchman2692 2 ปีที่แล้ว +1

      @@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

    • @awesometuts
      @awesometuts  2 ปีที่แล้ว

      @@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

    • @flyingdutchman2692
      @flyingdutchman2692 2 ปีที่แล้ว

      @@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?

    • @flyingdutchman2692
      @flyingdutchman2692 2 ปีที่แล้ว

      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

  • @jerrys.lawson5418
    @jerrys.lawson5418 2 ปีที่แล้ว +2

    Not to sound crazy. But your academy is sounding juicier and juicier. Soon, I hope I can enroll!

    • @awesometuts
      @awesometuts  2 ปีที่แล้ว +1

      Hope to see you inside B-)

  • @marcinmd4186
    @marcinmd4186 11 หลายเดือนก่อน

    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.

  • @Hamentsios10
    @Hamentsios10 ปีที่แล้ว

    Great tut

  • @newunitylearner6183
    @newunitylearner6183 2 ปีที่แล้ว

    Thank you, sir.

  • @usamabinabid3077
    @usamabinabid3077 2 ปีที่แล้ว

    Loved this 😍

  • @christianalejandroflores8501
    @christianalejandroflores8501 2 ปีที่แล้ว

    excellent!✨

  • @kelghou2437
    @kelghou2437 2 ปีที่แล้ว

    Cool video

  • @RAPHAELSC
    @RAPHAELSC 2 ปีที่แล้ว

    Really Good!

  • @martinzavodny
    @martinzavodny 2 ปีที่แล้ว

    great content as always, keep it up ;-)

  • @HikikomoriDev
    @HikikomoriDev ปีที่แล้ว

    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.

  • @sarthakmaiti89
    @sarthakmaiti89 2 ปีที่แล้ว

    First 🔥🔥

  • @lorenzoconsoli1916
    @lorenzoconsoli1916 2 ปีที่แล้ว

    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

    • @awesometuts
      @awesometuts  2 ปีที่แล้ว +1

      but you still need to access the scriptable object from other classes, right?

    • @lorenzoconsoli1916
      @lorenzoconsoli1916 2 ปีที่แล้ว

      @@awesometuts yes

    • @SroBlacKRose
      @SroBlacKRose ปีที่แล้ว

      @@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

  • @rakhu207
    @rakhu207 2 ปีที่แล้ว

    Sir I want to buy your course 🙂
    Have you teach game development with unreal engine C++ in your academy ?

    • @awesometuts
      @awesometuts  2 ปีที่แล้ว

      yes I do, I have unreal with blueprints and C++, and I am currently working on more unreal engine c++ content.

    • @rakhu207
      @rakhu207 2 ปีที่แล้ว

      @@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 🙂

  • @MonuYadav-oj5iy
    @MonuYadav-oj5iy 2 ปีที่แล้ว

    Hey someone knows how to make rolling template multiplayer in unreal engine

  • @prathamagarwal337
    @prathamagarwal337 2 ปีที่แล้ว

    Can I get Game Development job outside India?

  • @shitis7448
    @shitis7448 ปีที่แล้ว

    thanksss

  • @zipiro8942
    @zipiro8942 11 หลายเดือนก่อน

    to bad that unity is stupid