SOLID Principles in Unity

  Рет қаралды 153,928

Infallible Code

Infallible Code

Күн бұрын

Пікірлер: 205
@InfallibleCode
@InfallibleCode 5 жыл бұрын
Sign up for the Level 2 Game Dev Newsletter: eepurl.com/gGb8eP
@notared5948
@notared5948 5 жыл бұрын
Hey, great tutorial, any chance you could also link some reading materials for the SOLID principles you mentioned about?
@klarnorbert
@klarnorbert 4 жыл бұрын
@@notared5948 connect.unity.com/p/solid-principles-in-unity-part-1-solid-overview
@longuemire748
@longuemire748 2 жыл бұрын
Thank you for this tutorial. In a way, we can replace interfaces with scriptableObjects. What is the best method in your opinion?
@ThomasBCharlie
@ThomasBCharlie 3 жыл бұрын
As a self-taught programmer and game dev enthusiast I find that nearly all Unity tutorials completely gloss over any semblance of proper design patterns. They cock up quick scripts that do what their title says in sub-optimal ways and are impossible to expand and build upon. For years, such tutorials have been teaching me to haphazardly connect various Unity components and just hope for the best, and as a result I continue to rewrite my code over and over while struggling to make anything more complicated than the simplest Space Invaders knock off. Nowadays, I find these kinds of tutorials that actually talk about how code is written in in general much more useful than anything else. Being set in Unity helps a lot too, cause I'm not familiar with many frameworks outside of that. Thank you.
@HATL201
@HATL201 2 жыл бұрын
That's comparing apples to oranges. Most of the Unity tutorials on youtube are teaching you how to implement a certain game logic. And yes, they should be quick and concise, telling you exactly how to implement that logic and be done with it. On the other hand, code design patterns, principles and practices is a separate domain, and it's the responsibility of the user to learn them as well as the game logic on their own.
@buriedomasta3375
@buriedomasta3375 2 жыл бұрын
@@HATL201 where do I start from? I am a beginner
@nuin9937
@nuin9937 Жыл бұрын
@@buriedomasta3375 how did it go
@beardordie5308
@beardordie5308 5 жыл бұрын
For those struggling to use the selection manager outside of this or any project with it already working, here's a hard-earned tip: make sure your camera has a Physics Raycaster component on it.
@InfallibleCode
@InfallibleCode 5 жыл бұрын
Thanks for sharing this! I definitely glossed over this very important detail lol
@gadgetboyplaysmc
@gadgetboyplaysmc 4 жыл бұрын
Go up and save the day you foo! LIKES LIKES LIEKS!!!
@potatomilk7400
@potatomilk7400 4 жыл бұрын
and tag said camera as Main Camera. I almost had an aneurysm trying to figure out why it wouldn't work for me.
@al20ov87
@al20ov87 4 жыл бұрын
I don't have that on my camera and it still works fine
@kidsteveee
@kidsteveee 5 жыл бұрын
Oh man, we need more tutorials like this.
@InfallibleCode
@InfallibleCode 5 жыл бұрын
More content is in the works! Stay tuned! :D
@KHam56
@KHam56 4 жыл бұрын
I much preferred this teaching style of your videos over the mock conversations of the current videos. its faster to the content without the bloat of expression, "story building" filler moments like showing off gameplay, and the greeting conversation. time is precious and videos like this feel much more efficient and attention holding.
@TheGuyWithTheLemon
@TheGuyWithTheLemon 5 жыл бұрын
Dude this is a great tutorial! Finally, a channel that goes in-depth into core coding principles that every game programmer should be following! Coming from a coding background this level of detail is perfect!
@JackEatock
@JackEatock 3 жыл бұрын
As a student, I can't explain how useful your videos are at improving my code. Love your channel!
@n8dev
@n8dev 3 жыл бұрын
honestly this is the most helpful tutorial I have ever watched
@InfallibleCode
@InfallibleCode 3 жыл бұрын
Wow I really appreciate that!
@n8dev
@n8dev 3 жыл бұрын
@@InfallibleCode wow that was quick, I appreciate you making these tutorials so much! I am going to link your video on namespaces in my next devlog, it helped me organize my project really well. With Brackeys gone, I can see you blowing up as much as he did :)
@InfallibleCode
@InfallibleCode 3 жыл бұрын
@@n8dev I'm just glad that my videos are helpful, that's the most important thing :D
@NeoDragonEWW
@NeoDragonEWW 5 жыл бұрын
I love your tutorials. I like that you take on slightly advanced programming topics, show them in a real-world scenarios/use cases, and explain why the topic makes sense - eg. this video on the SOLID ideas that a lot of teams use.
@InfallibleCode
@InfallibleCode 5 жыл бұрын
So glad you found it helpful! I really like tackling these advanced topics because their so important and aren't covered very often.
@gadgetboyplaysmc
@gadgetboyplaysmc 4 жыл бұрын
I have not even watched the video in full and I'm fucking mindblown.
@THEspindoctor84
@THEspindoctor84 3 жыл бұрын
I didn't really get it, until I saw you swap out one script for the other at the end. Then it clicked...mostly. such a great video, and the production value is off the charts and very much appreciated
@dotaportalvideo
@dotaportalvideo 4 жыл бұрын
Was not expecting to become a better coder while looking at Unity tutorials today. Nice work.
@snook5555
@snook5555 5 жыл бұрын
Love code quality tutorials, it's an area I'm always looking to improve in
@krisitak
@krisitak 5 жыл бұрын
In this case, instead of interfaces, I'd use abstract classes that inherit from MonoBehaviour. That way you won't have to assume something IS A MonoBehaviour that IMPLEMENTS an interface. Also, some assertions to lock these invariants. Great video, nice editing.
@mayankbhaisora2699
@mayankbhaisora2699 2 жыл бұрын
Came across your channel a couple of days ago and it’s one of my favourite gamedev channels. Your tutorial easy to understand and you explain everything properly like the real problem, options, solutions. Great work man. Keep helping people like me.. thanks
@themerpheus
@themerpheus 5 жыл бұрын
Wonderful. Simply wonderful. Good explanation for those of who don't know SOLID principles.
@andrewshandle
@andrewshandle 5 жыл бұрын
Fantastic tutorial. When working in the corporate world, I always try and teach the SOLID principles to developers from day one. There's nothing more demoralizing then coming across legacy code with a 12,000 line method in a class that does 37 things and nobody knows how it works. ;)
@BrokenPuzzle03
@BrokenPuzzle03 3 жыл бұрын
You have taught me more than my 4 years in University
@InfallibleCode
@InfallibleCode 3 жыл бұрын
Wow! That's amazing to hear :D
@KasperSOlesen
@KasperSOlesen 4 жыл бұрын
All the SOLID principles explained and used in 15 minutes :) Good job.
@bgildersleeve
@bgildersleeve 5 жыл бұрын
Excellent tutorial. It's great to see videos like this that emphasize clean code principles!
@lightiichen
@lightiichen 4 жыл бұрын
This REALLY helps a lot as I'm just getting in designing my own game structure but not able to find a tutorial like this. KEEP IT UP BRO!!!!!!
@MaddinUndSo
@MaddinUndSo 3 жыл бұрын
this might bring a little bit more organization in my coding. thank you very much!
@shoco2
@shoco2 4 жыл бұрын
Honestly don't know another channel that explains everything so clearly and understandable, great video man
@ScilexGuitar
@ScilexGuitar 4 жыл бұрын
Im a beginner and I have no idea what is going on. Maybe I will in a few years. Saving this vid :D
@tapoutluke
@tapoutluke 3 жыл бұрын
Thanks for the video! This helped me make a WeaponManager class allowing for different weapon behaviors :D
@donnyjoe7653
@donnyjoe7653 Жыл бұрын
I like how you genuinely want to inform us about green being your favorite color, in a subtle side note 14:04 :D. Thanks for the great content!
@newpractice
@newpractice 4 жыл бұрын
this explanation of how scripts should interact with each has been just what I needed, thank you
@018FLP
@018FLP 2 жыл бұрын
What a relief! I'm an absolute code beginner, so it's easier for me to separate everything for debugging so i naturally code using something very close to this principle. Though i was dumb for making extra steps, but it's very cool to see this is a good practice. Nice!
@Bergquist3D
@Bergquist3D 5 жыл бұрын
Awesome video! I would love to see this turned into Pure ECS!!
@sparrowhawk81
@sparrowhawk81 5 жыл бұрын
Interfaces are nice. A dev partner and I have been working on a simple 2D shmup for about 1.5 years now (we are taking our time). It came in handy for a lot of stuff. We have interfaces like IProjectile that make it so that all our different types of projectiles HAVE to have a damage value, speed, lifetime, etc etc etc. It also comes in handy when using Zenject, which we do ;-)
@InfallibleCode
@InfallibleCode 5 жыл бұрын
Good stuff! I always love to hear about practical examples of OOP concepts being applied in game development.
@Osybear
@Osybear 5 жыл бұрын
Thanks for concise tutorial. Keep it up man!
@orc_spearman
@orc_spearman 5 жыл бұрын
Very good and easy to understand example, good job and thanks
5 жыл бұрын
Tip for clean code : event handlers should call a function, but not contain implementation. You want to have a quick look at it and understand what is going on, not read throguh the whole event.
@Ohlawdie
@Ohlawdie 5 жыл бұрын
Quick, cool, informative - as always Charles! Cheers, much obliged.
@lando6583
@lando6583 4 жыл бұрын
great tutorial. the community needs more videos like this.
@Walter5850
@Walter5850 2 жыл бұрын
Brilliant! I have been getting back to this video for quite some time, but I just wasn't ready to comprehend the ideas due to lack of knowledge. After reading about SOLID principles on my own and looking through some examples, I was able to familiarize myself with the core ideas. Afterwards, it was far easier to follow the video and I was able to learn much more from watching it.
@Brian-vs9sd
@Brian-vs9sd 5 жыл бұрын
Wow. This is an excellent tutorial on the SOLID principles. The example you used was so relevant not just to game programming but programming in general. Well OOP anyway.
@InfallibleCode
@InfallibleCode 5 жыл бұрын
I draw on years of experience building enterprise applications when I work on these tutorials. Some people think that those two worlds wouldn't mix but there's plenty of overlap between business and game development. Software is software at the end of the day.
@myriampaolachangoluisatoap3100
@myriampaolachangoluisatoap3100 4 жыл бұрын
Hello, could you post the link of the outline assets you are using? I got 2 errors related to outline script.
@myscipper
@myscipper 3 жыл бұрын
It's so beautyful :)
@CCV334
@CCV334 5 жыл бұрын
This is exactly what I've been looking for. Thank you so much for the clear and concise example!
@vasikplays8800
@vasikplays8800 4 жыл бұрын
Hey new subscriber here. Thank you so much. Please keep doing these videos.
@revraitah
@revraitah 4 жыл бұрын
Pretty cool and useful tutorial. Keep it up!❤️
@georgew.8282
@georgew.8282 3 жыл бұрын
That was one of the most enlightening tutorials I have ever seen. Thank you very much for this!
@orinom4128
@orinom4128 3 жыл бұрын
Your cats tail at the start made me think I had a spider on my screen and i proceeded to spend the next 3 minutes trying to find the spider in my phone
@ananttheant
@ananttheant 4 жыл бұрын
Thanks for your content, you are my go-to unity related programming Feed!!
@monkeyrobotsinc.9875
@monkeyrobotsinc.9875 3 жыл бұрын
yep. green is a great color.
@blasder007
@blasder007 4 жыл бұрын
amazing tutorial, i like how this is just at the level that i am at programming so i can understand everything , thanks!
@funkyjedi
@funkyjedi 5 жыл бұрын
Brilliant and clear, thank you, looking forward to more in the series.
@mana20
@mana20 5 жыл бұрын
Great video, looking forward to more architecture related videos. You should do a series on Event architecture(delgates, events, actions, func) to decouple code.
@BigDaddyGameDev
@BigDaddyGameDev Жыл бұрын
Great video! So many tutorials ignore good programming principles. I have a few bad habits to break.
@hematogen50g
@hematogen50g 4 жыл бұрын
You got my subscription, man!
@InfallibleCode
@InfallibleCode 4 жыл бұрын
Awesome, thank you!
@hematogen50g
@hematogen50g 4 жыл бұрын
@@InfallibleCode Got to complete test assignment for Unity programmer job. your channel really helps.
@android272
@android272 5 жыл бұрын
Thanks for this. I will be using this in my game. I have a class that is equivalent to your selection manager that does way more than what your class did at the beginning of the video. I have a lot of refactoring to do :)
@Sindrijo
@Sindrijo 5 жыл бұрын
Not that it is important to the lessons shown in this video but you could derive from Unitys IPointerEnterHandler and IPointerExitHandler interfaces (in the UnityEngine.EventSystems) instead of implementing your own raycaster. (Note that you do need to add a Physics Raycaster component to your Camera object for it to work, which I saw another comment mentioning but is actually not needed since the code in the video is doing its own raycast.)
@alpho94
@alpho94 3 жыл бұрын
Great video, but I have a question: it appears how in the update method of the SelectionManager you are first deselecting the object and then, if the raycast hit the object, put the selection back in the same frame. Wouldn't be better to put the select and deleselct methods in a if else statement, checking before the value of the raycast, so that you don't run both and save performance? also since those methods do the same thing, they could be unified by creating a single method which change the material or a value in the case of the outline, as taking it as input paramenter.
@Yulaw2k
@Yulaw2k 5 жыл бұрын
Please make more videos like THIS. Do it again with example 2, then example 3. You got alot of views on this. If you check out your spatialOS videos....not many views.... We appreciate your skills as a coder more then you dabbling into the "new".
@InfallibleCode
@InfallibleCode 5 жыл бұрын
Haha don’t worry more videos like THIS are definitely on the way. Only one more video left in the SpatialOS series so stay tuned to the channel.
@Yulaw2k
@Yulaw2k 5 жыл бұрын
​@@InfallibleCode "Celebrates"
@atakankuloglu4877
@atakankuloglu4877 2 жыл бұрын
Perfect explanation. Thank you for sharing your knowledge with the community!
@AethernaLuxen
@AethernaLuxen 4 жыл бұрын
Great tutorial! Btw, captions are broken
@wearwolf4202
@wearwolf4202 2 жыл бұрын
Your pop up literly was in the way of me seeing what you were doing.... thanks
@michailmarkou1995
@michailmarkou1995 2 жыл бұрын
amazing tutorial!
@modernkennnern
@modernkennnern 4 жыл бұрын
This feels a lot like a Ryder ad :P Really good tutorial though. Certainly got me thinking
@RenatVasetskyi
@RenatVasetskyi Жыл бұрын
good video, I often have crowded classes that are difficult to expand, fater this video i will try to do everything clearly
@ZoidbergForPresident
@ZoidbergForPresident 5 жыл бұрын
Quickie: we could use a List, right? To get outline AND highlight?
@mehmetoguzyardimci8598
@mehmetoguzyardimci8598 4 жыл бұрын
Quality content!
@NorthernlionLP
@NorthernlionLP 2 жыл бұрын
Decent video, using so many IDE options instead of just copy-pasting was slightly infuriating tho :p
@endorphingames2957
@endorphingames2957 2 жыл бұрын
Yes make it more complicated looking at specific IDE functionality rather than copy paste
@daniilparokonnyy7980
@daniilparokonnyy7980 5 жыл бұрын
So useful! Thanks a lot!
@InfallibleCode
@InfallibleCode 5 жыл бұрын
Glad you found it useful!
@rutulthakkar9289
@rutulthakkar9289 3 жыл бұрын
how is the tag being referenced in the new classes you created from the selectionManager ?
@darkman237
@darkman237 3 жыл бұрын
What about using c# events to decouple the code?
@endorphingames2957
@endorphingames2957 2 жыл бұрын
Yes, I would have a script on each object with the functionality of changing its own material. Selection manager would only sent events on raycast.
@jeffng50
@jeffng50 4 жыл бұрын
I have a few questions: 1. How does the concrete SelectionResponse seep into the code as it just initialises ISelectionResponse the interface? 2. What if I want both effect to manifest? Highlight and outline together?
@JJordanov945
@JJordanov945 4 жыл бұрын
Is there any way we can use both Highlight and Outline Selection Responses simultaneously? I've been playing around with it but as you've mentioned in the vid you have to remove one to place the other. I want to know if I could make a third Response class, say InteractiveSelectionResponse, which is responsible for handling mouse input when you press on a selected object, while still making use of the HighlightSelectionResponse component for visual feedback.
@Daedhal
@Daedhal 3 жыл бұрын
WHAT ABOUT ADDING A LINK TO THE ASSET USED FOR OUTLINE ?? Edit: After searching for a while, here is the asset used in the video assetstore.unity.com/packages/tools/particles-effects/quick-outline-115488
@turin2
@turin2 3 жыл бұрын
Very much appreciated , thanks!
@d11men1234
@d11men1234 2 жыл бұрын
Thank you very much dude
@abwuds7208
@abwuds7208 5 жыл бұрын
Great job! Quick question though, why don't you have a Rider warning for the serialized + private fields that don't begin with an underscore?
@lunkums
@lunkums 3 жыл бұрын
Hi! awesome tutorial you've created, but i have one question. What is the difference between the deselect and select code bodies? They look identical
@lunkums
@lunkums 3 жыл бұрын
nevermind, i didn't see that deselect was default mat and select was highlight mat. Thank you
@Yulaw2k
@Yulaw2k 5 жыл бұрын
What about putting any ISelectionResponse as a scriptable Object. Since its only being used by the SelectionManager. You know how an scene object can have alot of components attached to it. Instead of adding another one script to the object, you can drag the selection behavior onto the script using it. Is this a good, or bad idea?
@romeogaming6424
@romeogaming6424 4 жыл бұрын
Excelent, thanks!
@N0biKn0bi
@N0biKn0bi 4 жыл бұрын
why do you name some variables with an _ at the beginning?
@TheNamesJT
@TheNamesJT 4 жыл бұрын
This is a bit out of my scope of c#, i have an idea though it would be nice if you made a c# basics and intermediate series but to stand out from all the other youtube videos that do this you could make the video like you did in your "Unity Events in Action" and "C# Events in Unity" videos. I like how you incorporated problem solving while also teach code in a in game project. Many many youtube c# series just teach you the basic syntax and read the definition from the documentation and don't show in game examples.
@chrisgreenwell3404
@chrisgreenwell3404 5 жыл бұрын
Really great , thank you :)
@IronFreee
@IronFreee 4 жыл бұрын
I wrote my own "selection manager" raycast code a long time ago, I didn't knew there was an already made one. So I never had those limitations...
@coolergappney1943
@coolergappney1943 Жыл бұрын
Can we do videos where we DON'T use weird tools to replace and alter logic. It's hard to follow the process of ACTUALLY structuring when youre making the program do it. I wanna learn something not just copy finished code at the end.
@r1pfake521
@r1pfake521 5 жыл бұрын
The only annoying thing here is that Unity can't serialize interfaces so you can't drag&drop them in the editor. That's why I usually create a abstract base class which also inherits from MonoBehaviour instead (obviously this only works if the class only implements a single "interface", because otherwise it couldn't inherit from multiple abstract classes). It's kinda ugly, but I don't want to lose the drag&drop workflow in the editor.
@-Engineering01-
@-Engineering01- 2 жыл бұрын
I think this is a double edged knife. We use these patterns to make the code look more readable but at the same time we're over engineering the code with lot of classes especially for a small hyper casual game where at these patterns maybe never needed.
@magnusm4
@magnusm4 4 жыл бұрын
The problem I have is I try to make my own physics, sort of. I try to make everything come down to one vector3 mainMovement. Then other methods such as SlopeDifference use transform.forward and input. It becomes a cluster**** of variables they use that is shared and changed through the entire script.
@MatheusAugustoGames
@MatheusAugustoGames 3 жыл бұрын
I think instead of LSP, you used DIP at around 8:08. I could be wrong.
@asafalroy2159
@asafalroy2159 3 жыл бұрын
Great tutorial! I have a question though, what would you do if you'd want to combine the two behaviors of the selection responses together, so everytime you hover over a GameObject you'd want to highlight /and/ outline it? Thanks!
@vilinder
@vilinder 4 жыл бұрын
I am confused, is the downloadable project one before or after the refactoring is done?
@prudhvi9256
@prudhvi9256 4 жыл бұрын
thanks for the tutorial, it would have been great if you only used 2/4 of your objects to use the new green highlight methods while having the others still swap to yellow, if that is instead of it would have worked.
@Tofos94
@Tofos94 3 жыл бұрын
i started unity 1 year ago and i tried this tutorial last year. I didnt understand anything :D maaan now i see how messy my code actually is. As a software engineering student in 2. semester i just learned how to code object oriented and with an mvc principle but i feel i cant use these methods in unity/c#
@josephdaniel235
@josephdaniel235 4 жыл бұрын
Hello, I know this code is a year old but does this follow the same logic as the one previous? I only ask because the previous code is completely different in this video.
@piotrw3366
@piotrw3366 5 жыл бұрын
Hi Charles! Great video! Is making monobehaviour uicontroller an interface a good idea? I wanted to make an interface out of it so maybe pc has different UI than mobile game but if they use the same interface I could just find the interface in Game Manager class and use whatever UI type I get. But can't find a good way to find my UI interface beside var ui = FindObjectsOfType().OfType(). Do you think it's a good way to do it? Thanks!
@piotrw3366
@piotrw3366 5 жыл бұрын
Hi Charles! Sorry to bother you but after asking the question I came up with a solution. I get a public GameObject to the uicontroller monobehaviour and use on it GetComponent instead of looping through all the monobehaviour. Do you think it's a good workaround? Thanks!
@madey1685
@madey1685 3 жыл бұрын
How to change _selectionResponse value at runtime?
@mrduby3464
@mrduby3464 4 жыл бұрын
Is there any reason why the shapes don’t have their own script? Is it a best practice to have your raycast script have the material and outline script on it. My first thought while watching this would be to have each shape have the same script that implements the interface and handles all the outlining logic. Therefore each object has a reference to its own material render/outline. Seems like the raycast shouldn’t need to tell the object it’s over to change its outline/material tenderer. It should be referenced and up to the object itself
@endorphingames2957
@endorphingames2957 2 жыл бұрын
Yes, I would have a script on each object with the functionality of changing its own material. Selection manager would only sent events on raycast.
@Storm3532
@Storm3532 5 жыл бұрын
It's great, but why not just use UnityEvents? This way things will still be nice and decoupled, but much less code (= time) required overall. With UnityEvents, in most cases you won't even need to write a script for a responder, just set what needs to be done directly in the inspector. This flexibility allows to change stuff very fast, which is important in game development.
@Frozthog
@Frozthog 5 жыл бұрын
Hey Storm! If you don't mind, what would be the steps to replicate the steps in this video but with UnityEvents? I've never really gotten a grasp of unity events and how to use them.
@Storm3532
@Storm3532 5 жыл бұрын
@@FrozthogHi, sorry for the late response, notification hasn't appeared for some reason. If you haven't found it out already: for example, to implement the highlight behaviour, add two UnityEvent fields, onSelect and onDeselect, to the selection manager script, then call onSelect.Invoke() when the selection happens, and onDeselect.Invoke() when it's lost. Now drag the renderer component into the created events in the inspector, then choose Renderer.Material to be set, and assign the materials. Right now I'm actually using a much more versatile solution, UltEvents by Kybernetik, it's free on asset store.
@mrslake7096
@mrslake7096 3 жыл бұрын
for prototypes or small projects, I think these principles can be overdone , which means you reduce your productivity & increase code complexity. But I can see how they can be very helpful for larger projects or long term projects
@Laure2full
@Laure2full 4 жыл бұрын
The code is difrent thant it was last ep did you change it and why?
@dickyerlangga7473
@dickyerlangga7473 4 жыл бұрын
thanks for the video, i have followed the instructions based on the video. but i have problem with this error 'The type or namespace "Outline" could not be found (are you missing a using directive or an assembly reference?)'. how to fix it? thanks
@mrduby3464
@mrduby3464 4 жыл бұрын
Did you make sure to actually download the Outline pack he said he got off the store? Outline isn’t a native component to Unity so unless you got the same asset off the store Unity has no idea what that is.
@rohith6xt
@rohith6xt 3 жыл бұрын
Does raycast work in augmentation reality
@Robbin_Bob
@Robbin_Bob 2 жыл бұрын
probably a bit late to this but that syntax highlighting theme you have is amazing, what setup do you have?
@Dohman
@Dohman 5 жыл бұрын
Thanks for the captions. / Deaf guy
@happyfarang
@happyfarang 5 жыл бұрын
Great video. Very solid info. I just wonder, what if you want to make the response conditional, f.ex say, if you looking north make them yellow, if not then use the green outline. Something like that. You would have to make a new class with both interfaces? or am i missing something obvious here? :) I will have to watch this a few times
@InfallibleCode
@InfallibleCode 5 жыл бұрын
If you wanted to response to be conditional then you could apply the Null Object pattern. But if you wanted to implement more sophisticated behavior then you'd need to implement a new class to handle it. Does that make sense?
@happyfarang
@happyfarang 5 жыл бұрын
@@InfallibleCode Makes total sense :) I think i understand it! I will try to make my own test. I like this pattern. The "kind of generic" approach hehe.
@vedrantomiciccantizano8986
@vedrantomiciccantizano8986 2 жыл бұрын
for outline, need the asset's name, please
Unleash the Power of Raycasts with Dot Product (Unity Tutorial)
12:53
Infallible Code
Рет қаралды 39 М.
Learn By Example - SOLID Principles in Unity (Part 2)
11:40
Infallible Code
Рет қаралды 41 М.
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 95 МЛН
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 8 МЛН
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 4,5 МЛН
The Power of Scriptable Objects as Middle-Men
17:41
samyam
Рет қаралды 130 М.
Software Architecture in Unity
7:13
Jason Storey
Рет қаралды 121 М.
4 Tips for Refactoring Your Code for Readability
14:58
Infallible Code
Рет қаралды 31 М.
Events or UnityEvents?????????
15:43
Jason Weimann (GameDev)
Рет қаралды 105 М.
The 6 Design Patterns game devs need?
24:20
Jason Weimann (GameDev)
Рет қаралды 373 М.
Learn SOLID Principles with CLEAN CODE Examples
28:35
Amigoscode
Рет қаралды 279 М.
Game Architecture Tips - Unity
19:52
Dapper Dino
Рет қаралды 143 М.
SOLID Principles: Do You Really Understand Them?
7:04
Alex Hyett
Рет қаралды 207 М.
Unite Austin 2017 - S.O.L.I.D. Unity
1:07:18
Unity
Рет қаралды 85 М.
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 95 МЛН