What are Interfaces? (C# Basics)

🌍 FREE C# Beginner Complete Course! • Learn C# Beginner FREE...
🔴 Watch my Complete FREE Game Dev Course! 🌍 • Learn Unity Beginner/I...
📝 C# Basics to Advanced Playlist • C# Basics to Advanced
🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses​
👍 Learn to make awesome games step-by-step from start to finish.
🎮 Get my Steam Games unitycodemonkey.com/gamebundle
✅ Let's learn all about Interfaces in C# and how they help us write cleaner code!
Get the Project Files and Utilities at unitycodemonkey.com/video.php...
Learn Unity in 17 MINUTES!
• Learn Unity in 17 MINU...
Learn C# BASICS in 10 MINUTES!
• Learn C# BASICS in 10 ...
What are Events? (C# Basics)
• What are Events? (C# B...
What are Delegates? (C# Basics, Lambda, Action, Func)
• What are Delegates? (C...
What are Interfaces? (C# Basics)
• What are Interfaces? (...
What are Generics? (C# Basics)
• What are Generics? (C#...
What are Loops? (C# Basics, for, while, do)
• What are Loops? (C# Ba...
Unity Tips in 10 MINUTES!
• 12 MORE Unity Tips in ...
Unity Basics for Beginners
• Learn Unity in 17 MINU...
3 Ways to Shoot Projectiles in Unity
• 3 Ways to Shoot Projec...
Modular Character System
• Modular Character Syst...
Patreon Sponsor: www.badadventurer.com/
If you have any questions post them in the comments and I'll do my best to answer them.
🔔 Subscribe for more Unity Tutorials / @codemonkeyunity
See you next time!
📍 Support on Patreon / unitycodemonkey
🤖 Join the Community Discord / discord
📦 Grab the Game Bundle at unitycodemonkey.com/gameBundl...
📝 Get the Code Monkey Utilities at unitycodemonkey.com/utils.php
#unitytutorial #unity3d #unity2d
--------------------------------------------------------------------
Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.
I've been developing games for several years with 7 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
You can see my games at www.endlessloopstudios.com
--------------------------------------------------------------------
- Website: unitycodemonkey.com/
- Twitter: / unitycodemonkey
- Facebook: / unitycodemonkey

Пікірлер: 397

  • @CodeMonkeyUnity
    @CodeMonkeyUnity4 жыл бұрын

    🌍 FREE C# Beginner Complete Course! kzread.info/dash/bejne/ooaZtJiTadWxXdI.html 🔴 Watch my Complete FREE Game Dev Course! 🌍 kzread.info/dash/bejne/c6F7taeBZ7TJdMo.html 📝 C# Basics to Advanced Playlist kzread.info/head/PLzDRvYVwl53t2GGC4rV_AmH7vSvSqjVmz 🌐 Have you found the videos Helpful and Valuable? ❤️ Get my Courses unitycodemonkey.com/courses or my Steam Games 🎮 unitycodemonkey.com/gamebundle Let's learn all about Interfaces in C# and how they help us write cleaner code!

  • @tisurmaster

    @tisurmaster

    4 жыл бұрын

    Could you recreate games you made, from scratch? like, the exact same game from scratch.

  • @ArkyonVeil
    @ArkyonVeil3 жыл бұрын

    I've used Unity for around 6 years now and every time I bumped into interfaces, I dismissed them. Seeing them depicted in this way and with a real use case made me better comprehend how useful they can be! Thank you so much for the great tutorials.

  • @titanicpat1275
    @titanicpat12753 ай бұрын

    There seems to be 2 kinds of failing to understand something in coding The traditional one, we're all familiar with is - _"I didn't understand the words you used, and I couldn't recreate what I saw on screen, because I got it wrong"_ But the far worse one (and I struggle with this all the time) is _"it's completely clear what you did, I can totally recreate that, but I can't for the life of me work out the value of doing that."_ Thank you for this video that cured me of the second type!

  • @toastyshrimp1882
    @toastyshrimp18822 жыл бұрын

    I have been trying to understand interfaces for SO LONG. Every single video about them seems to skip over passing objects that implement interfaces into methods. Now knowing what they are used for, that was KEY to understanding them. I seriously could not figure out why they were useful because it seemed redundant to define a method in a separate place instead of where you were using it. Thank you, seriously.

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    2 жыл бұрын

    I'm glad the video helped you! Thanks!

  • @YuriST
    @YuriST2 жыл бұрын

    Straight to the point, and the damage example showing in practice how to use it makes it very easy to understand. Definetly learned something useful from this and will change my code right away. That's why this video is the top search for "unity interface".

  • @iDigvijaysinhG
    @iDigvijaysinhG4 жыл бұрын

    I have knowledge about interfaces since college days but never had easy and realistic example like this. Now I would definitely go crazy defining lots of Interfaces, Thanks CM No matter how basic your videos are, they are always helpful in one way or another

  • @sleepsleeper4466

    @sleepsleeper4466

    3 жыл бұрын

    The fucking backhanded compliment at the end was so unnecessary holy shit

  • @beri4138

    @beri4138

    3 жыл бұрын

    @@sleepsleeper4466 I don't think he meant it that way

  • @nilsmuller-cleve6769
    @nilsmuller-cleve67692 жыл бұрын

    So far the best explanation I've seen for interfaces and I finally grasped what these things are doing. Thanks a lot!

  • @huyopo
    @huyopo4 жыл бұрын

    Another way on how to use Interfaces in unity is to define an Abstract Scriptable Object that implements the functionality of the Interface. The clases that implement the interface then have a Serialize field where you can drag in the concrete implementation of the scriptable object. And you implement the interface by calling the function on the scriptable object. I even got so far to make a propertyAttribute that uses reflection to show all classes that inherit from the abstract class in a dropdown and automatically creates a scriptable object for me. You can go really complex with that and you can easily switch between different behaviours just by using a dropdown menu. And the best? if you want to add a new function, all you have to do is to create a class that inherits from the abstract scriptable object. Done.

  • @sommmen

    @sommmen

    4 жыл бұрын

    thats pretty clever lol

  • @noargames6628

    @noargames6628

    4 жыл бұрын

    To be honest that's super useful, I never thought about it

  • @huyopo

    @huyopo

    4 жыл бұрын

    @@noargames6628 It really is a gamechanger for me. And once you use it, you realize you can do a lot more like allowing objects to talk with each other just by sharing the same object

  • @debugdotlog7745

    @debugdotlog7745

    4 жыл бұрын

    @@huyopo Hey, could you elaborate a little more please, I'm having trouble understanding this implementation

  • @huyopo

    @huyopo

    4 жыл бұрын

    @@debugdotlog7745 well, the key part is a method that gets all derived classes from a base class you can easily find that using google. And with that on hand you can make a custom property drawer that shows a dropdown menu with the contents from that method. And if you choose an option it can automatically create the scriptable object for you. If you know editor scripting it's actually not that hard, if you don't know it then learn it its really useful. If you don't get that, you can skip it and just use it with drag and drop. The rest is pretty much an implementation of the strategy pattern. The Monobehaviour implements the Interface and the interface method calls the method on the scriptable object. So like this: Class Entity:MonoBehaviour,IMovable { [ScriptableObjectDropdown] MoveableScriptableObject moveScriptable; void Move() { moveScriptable.Move(transform); } } abstract class MoveableScriptableObject:Scriptable Object { public abstract void Move(Transform transform); } And then you can write a lot of derived classes from the Scriptable object and you can easily switch between them via dropdown.

  • @YuraBazhan
    @YuraBazhan2 жыл бұрын

    Best understand explanasion about Interfaces I ever seen. Thank you a lot!

  • @explior6558
    @explior65583 жыл бұрын

    Thank you, I had a really hard time understanding interfaces. When I started the video I was completely lost, but with your example everything became really easy! You should keep making examples after the teaching part!

  • @MichaelHeist
    @MichaelHeist2 жыл бұрын

    Just another video that has dramatically taken away extra lines of code, and simplified my project! I enjoy seeing everything applied and how everything becomes much more scalable.

  • @b.c.a683
    @b.c.a6839 ай бұрын

    I started really few days ago and every topic I watched , really nice explanation and simple examples.Thank you for prepared these .

  • @chuckdude514
    @chuckdude5142 жыл бұрын

    Your didactics never cease to amaze me. Thank you for not only explaining what it is, but also showing us where it can be useful!

  • @williamjay2386
    @williamjay23863 жыл бұрын

    I want to thank you, man. This is one of the best videos I have seen on interfaces, not just because you explain how it works but you gave a concise use case that is common. I never thought that I would find a non-esoteric use for interface but I am glad to be proven wrong and to incorporate interfaces in my own project.

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    3 жыл бұрын

    Thanks! I'm glad you found the video helpful!

  • @glasgood9907
    @glasgood99079 ай бұрын

    Excellent, was slightly puzzled by Interfaces and with your clear explanation it now makes sense.

  • @cwdgamedev1017
    @cwdgamedev10173 жыл бұрын

    Thank you for making these clear and concise tutorials. You are great at it!

  • @charged7177
    @charged71773 жыл бұрын

    "C# Basics to Advanced" is awesome! Many have (including me) a problem understanding the concepts and how they can implement them to their game.. You cover both! More examples of implementation (problematic vs correct) would be great. Thanx for the help!

  • @jonathancasper2301
    @jonathancasper23013 жыл бұрын

    I love Object Oriented Programming, I used to hate interfaces because I didn't understand them properly, but this video helped make it clear as day and I will be using these all the time from now on! Thank you.

  • @RazixStyle
    @RazixStyle Жыл бұрын

    I love this video. As a game artist trying to learn C# I need to see how my code works and what it is capable of, the example with the 3 different objects truly creates an Aha moment in my brain!

  • @dennisgonzales9521
    @dennisgonzales95214 жыл бұрын

    Awesome video, thanks! These practical examples are very useful, because it helps ua give the basic idea on how we can implement it by ourselves. Now that's what missing at most of tutorials, they just explain it no practical example. Thanks again!

  • @guillaumeretureau482
    @guillaumeretureau4824 жыл бұрын

    Hey Code Monkey ! First of all, thanks for all the effort you have put into this channel, it's great to find people like you ready to help and teach learners! Your channel is kinda my Bible, anything I need, I come here first and most of the time, you answered my question! So thanks you for that and big shout-out for your games, they are great! I also had a question: do you have any tip for learning how to make visual art? I'm teaching myself about videogame development and if, as a computer science student, code isn't much a problem, art is. I haven't any artistic background and I have trouble making proper characters sprites, scenery, etc... I really like the style you use in your games with only a head, a torso and a pair of hands and feet. It seems easier to customize than making a full body everything. The visual is what makes me drop every project. I know I could find pre-made packs online but it feels like the game is no longer mine if I use those... Thanks for everything and have a good day! Guillaume.

  • @zildeos9858
    @zildeos98583 жыл бұрын

    i have never been this excited to use something i learned in my life thank you

  • @subliminalcastillo2126
    @subliminalcastillo21263 жыл бұрын

    Your video format for tutorials is perfect. Brief description of topic in intro. An overview of what you'll talk about. Teaching about the thing. Practical example of thing. It's ordered in a clear, concise manner that is captivating, and flows naturally every time.

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    3 жыл бұрын

    Thanks! I'm glad you like it!

  • @subliminalcastillo2126

    @subliminalcastillo2126

    3 жыл бұрын

    ​@CodeMonkey I use your videos 10x more than Microsoft's own documentation. My brain struggles to remember certain things (product of being a degenerate addict in my youth) so I always come back to reference certain things using your videos.

  • @egortyukin6645
    @egortyukin66453 жыл бұрын

    Very good explanation. Easy to understand and to follow along. Thank you very much!

  • @mahmutucak2293
    @mahmutucak22934 жыл бұрын

    i was expecting this. thank you for your awesome tutorials.

  • @leoking3235
    @leoking32353 жыл бұрын

    I just have just one question ... how on heaven and Earth do you code so fast? Not just typing, but navigating from line to line, cutting and pasting lines, inserting functions etc. It's mesmerising.

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    3 жыл бұрын

    It's all about experience! I've been writing code for over 20 years!

  • @0xbitbybit

    @0xbitbybit

    3 жыл бұрын

    Haha you know it's sped up for most of his typing right?

  • @vulcan20

    @vulcan20

    3 жыл бұрын

    @@0xbitbybit He's not talking about those parts lol

  • @baenbo3486

    @baenbo3486

    2 жыл бұрын

    You just gotta learn the shortcuts. They're like magic!

  • @gennadiyshvetsov4115

    @gennadiyshvetsov4115

    2 жыл бұрын

    @@CodeMonkeyUnity hello. What’s your take on Interfaces vs Components? It can be HealthComponent instead of IDamagable interface. Component provides implementation but complicates communication(between components of the same gameObject).

  • 2 жыл бұрын

    Finaly I understand the usage of interfaces. Thank you for good lessons!

  • @harshbarvaliya8819
    @harshbarvaliya8819 Жыл бұрын

    i am a beginner in c# and got so amused by this use case of interfaces , you are setting my expectations high from youtube videos ❤❤❤❤❤❤

  • @bathtubanarchy
    @bathtubanarchy11 ай бұрын

    This was very helpful, thank you.

  • @davidvarga2916
    @davidvarga2916 Жыл бұрын

    For the first 9 minutes of the video I was clueless of what was happening. Wondering why would I even use this or how. Then you started the example and it clicked. This is exactly what I was looking for. Thanks

  • @kennethbailey9802
    @kennethbailey98022 жыл бұрын

    oh man....your tutorials are taking me to the next level lol, my whole game project is(was) made up without the use of interfaces and generics...thanks for these tuts and the courses on udemy!

  • @vincewa2142
    @vincewa2142 Жыл бұрын

    I spent the last 2 hours searching the web for how to see if an object contains a interface of a particular type similar to what you showed except through ray casting. After watching your video I confirmed I was executing my code correctly and it should have been working the way I thought it would have (for example being able to do TryGetComponent) When it didn't work I thought maybe you cant do that since its not the classes direct name but you confirmed my thought that you can. Then I noticed it was because I had a box collider on the object and not a box collider 2D. (Im making a 2D game) And that's how I wasted 2 hrs of my life.

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    Жыл бұрын

    Heh that happens, good news is the next time you come across a similar issue you already know what might be the problem!

  • @dererzherzog
    @dererzherzog3 жыл бұрын

    Another one of those great videos by CodeMonkey and the best one out there to understand interfaces. It's very concise and to the point as a whole, but the second part of it (08:30 onward) is like PURE GOLD. Not only is it demonstrating the theoretical purpose and usefulness of interfaces, but also giving a clear, real, no-bullshit implementation example.

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    3 жыл бұрын

    Thanks! I'm glad you liked it!

  • @keetee-ei3er
    @keetee-ei3er Жыл бұрын

    Found this channel, I am exited to learn new consepts. Seems like this guy is quite good about explainign things, I am sure it is not easy task to explaing how to write a code for a some codemonkey like myself XD

  • @johnx140
    @johnx1402 жыл бұрын

    This was so good!!!! Thank you bro!!

  • @RomainDelmaire
    @RomainDelmaire3 жыл бұрын

    Last tuts I checked about Interfaces showed no example or implementation using an Instance game object so I was left wondering why in hell I would ever use Instances in the first place. Great video that explains clearly with a real case scenario!

  • @user-nt1ll1bd2c
    @user-nt1ll1bd2c4 жыл бұрын

    This tutorial is very helpful. Now I'm the fan of your channel. :)

  • @algs5483
    @algs5483 Жыл бұрын

    Quite interesting! Thanks Hugo!

  • @tigranavagyan1587
    @tigranavagyan1587 Жыл бұрын

    Thank's a LOT for this video!!! 👍

  • @RickusDomesticus
    @RickusDomesticus2 жыл бұрын

    This is extremely useful! Thanks for the tutorial!

  • @thedevquest7676
    @thedevquest76764 жыл бұрын

    BOOOM! Love it!!! Literally asked for this today =) thank you

  • @thedevquest7676

    @thedevquest7676

    4 жыл бұрын

    11:30 in and It just clicked!.... Wow, this is powerful!

  • @stellar7933
    @stellar7933 Жыл бұрын

    Interfaces look so easy to implement, I'm definitely gonna use them more and write cleaner code with them.

  • @Oxmond
    @Oxmond4 жыл бұрын

    Cool stuff! Great C# tutorial! 👍🤓

  • @Nova04550
    @Nova045502 жыл бұрын

    This made it finally click for me!! Thank you!

  • @Dippps
    @Dippps4 жыл бұрын

    Hi. Your channel helps a lot to beginner. Best unity channel.

  • @ayushsidam289
    @ayushsidam289 Жыл бұрын

    Wow!!! Thanks sir for the video. 😀👍🏻

  • @l0ckandl0ad
    @l0ckandl0ad3 жыл бұрын

    Thanks for showing a realistic use case. The problem I had/have with Interfaces (bar newest C# version with an ability to define a default implementation, like you've described) is that you actually do not avoid copy-pasting entirely, because you have to implement the interface in each class anyway. Most of the time I found inheritance/overrides (polymorphic approach) to require less lines of code. But that's not always applicable and not so flexible/extensible as using interfaces, of course, since you need to figure out your tree of inheritance beforehand and then stick to it. Thanks again!

  • @B4NTO
    @B4NTO Жыл бұрын

    Thx for your videos they are great :)

  • @paulihelsi9852
    @paulihelsi98523 жыл бұрын

    Thanks. Your videos are well explained and it's good that you show examples how to use the stuff you teach

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    3 жыл бұрын

    Thanks! I'm glad you found the video helpful!

  • @TheJangoo
    @TheJangoo4 ай бұрын

    Excellent explanation 😁

  • @MrCaptainbirdman
    @MrCaptainbirdman4 жыл бұрын

    Very helpful! We use interface for OOP in Java but I never knew how to implement them in Unity C#

  • @moviesandvisualfx5663
    @moviesandvisualfx56632 жыл бұрын

    YOU MAKE THIS SO CLEAR !!!!!!!!!!!!!!! xxxxxxxxxx

  • @user-or9jg4ix5i
    @user-or9jg4ix5i6 ай бұрын

    Thank u Mr, usually I can't find anyone else u can explain in an easy way.

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    6 ай бұрын

    I'm glad the video helped you! Thanks!

  • @MikeStock88
    @MikeStock88 Жыл бұрын

    Awesome, thanks for sharing

  • @davegamedevelopment
    @davegamedevelopment4 жыл бұрын

    Thanks, very helpful for me as learning game dev :D

  • @signalised9540

    @signalised9540

    4 жыл бұрын

    I find u everyone Dave :D

  • @davegamedevelopment

    @davegamedevelopment

    4 жыл бұрын

    @@signalised9540 Haha... I'm where the other gamedevs are :D

  • @edgar1906
    @edgar19064 жыл бұрын

    Now I see why interfaces are used! Thank you! Could you do a video about how data structures are used in game dev please? (LinkedLists, Queues, Stacks, HashMaps, etc...)

  • @vahidseyidov
    @vahidseyidov Жыл бұрын

    just cool, into the unity, nice!🙌🏼

  • @shi-woonyi2605
    @shi-woonyi26052 жыл бұрын

    Amazing just watched two tutorial from you and it helped me out tremendously, just because you show real use examples. I mean interfaces seemed easy but I asked myself "what am I gonna use them for?" After your example it's much easier to find real use for them Same for your delegates tutorial! Subbed and bookmarked your channel, thank you. Time to edit some code.... x)

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    2 жыл бұрын

    I'm glad the videos helped you! Thanks!

  • @ramanujanmadhusudhan8131
    @ramanujanmadhusudhan81314 жыл бұрын

    Great video as always, would also like to see a video on the new animation rigging package.

  • @thiengen3426
    @thiengen34263 жыл бұрын

    Thanks , it's helpful

  • @unityvictor787
    @unityvictor7873 жыл бұрын

    Very Good Tutorial!! EZ 2 understand

  • @liiiar
    @liiiar3 жыл бұрын

    Uau. Agora entendi a importância de interfaces! Fez meu dia terminar com chave de ouro, muito obrigada!

  • @improvefps
    @improvefps3 жыл бұрын

    if your struggling to follow along as he is explaining like i did because he talks really fast while explaining like this class uses this interface which uses this function and start to get confused then changing the playback speed to 0.75 speed and sometimes pausing to think helped me to eventually grasp interfaces :)

  • @nocultist7050
    @nocultist70504 жыл бұрын

    I love you. When I'll have some spare money I'll reward your kindness. I was missing just this bit for so long... If I only found out about it earlier I pobably would be a proper gamedev by now...

  • @AndreaLPM1
    @AndreaLPM13 жыл бұрын

    Amazing tutorial!

  • @brianwilson7497
    @brianwilson7497 Жыл бұрын

    beautiful, thanks

  • @mehdidev9926
    @mehdidev9926 Жыл бұрын

    best video ever on interfaces ,thank youuuuuuuuuuuuuu

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    Жыл бұрын

    I'm glad the video helped you! Thanks!

  • @svetavasilieva7841
    @svetavasilieva78414 жыл бұрын

    Thank you very much

  • @ashutoshaswal
    @ashutoshaswal3 жыл бұрын

    Awesome Content

  • @y01cu_yt
    @y01cu_yt Жыл бұрын

    Thanks!

  • @vandermunnik
    @vandermunnik Жыл бұрын

    I never really had to use interfaces, didn't see the point of using them - until now! I had another system in place for my game (unity events) where the player can look at objects (FPS game) and interact with it using a mouse click if the gameobject had an 'interactable' component attached to it, I ditched it because now I totally understand interfaces now Code Monkey thanks to you - no one else was able to properly explain its purpose - I implemented it and my code is so much cleaner now!! (cut out like 50 lines of code), thanks again!

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    Жыл бұрын

    That's awesome, I'm glad the video helped! Thanks!

  • @zekiozdemir420
    @zekiozdemir4202 жыл бұрын

    Thank you

  • @Gino12164
    @Gino121644 жыл бұрын

    I like interface working togetter with a abstraction. you can make really powerfull things out of it.

  • @sandip_1698
    @sandip_1698 Жыл бұрын

    i have fear to learn interfaces but when i watch your video then its gone, and i also started to loving interfaces as well as your flow of teaching that, thank you so much sir

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    Жыл бұрын

    I'm glad you're no longer afraid, they are an excellent very powerful feature!

  • @tostpl8258
    @tostpl82584 жыл бұрын

    Yeah I already knew what are interfaces and how they work but still like this video Btw I can't wait until unity support c# 8 :) It will be awesome.

  • @spectralspace8866
    @spectralspace8866 Жыл бұрын

    Thank you!!!!!!!!!!!!

  • @Daeniak57
    @Daeniak573 жыл бұрын

    Hi im french Canadian and i just want to say you helped me a lot, thank you!

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    3 жыл бұрын

    I'm glad to hear it! Thanks!

  • @Daeniak57

    @Daeniak57

    3 жыл бұрын

    @@CodeMonkeyUnity No problem

  • @AxZelAnimations30
    @AxZelAnimations302 жыл бұрын

    I really need something like this because I'm planning on making a bunch of characters with different scripts but the damages and knockbacks needed to work the same for everyone. The first examples are so confusing I wanted to give up and just do the "everyone will share the exact one script" mindset, until I reach the part of the video with actual implementation and it's much easier to understand.

  • @MaskedImposter
    @MaskedImposter Жыл бұрын

    Interfaces are interesting and I've been wanting to try and use them for awhile, but I haven't found a good use case yet in my projects. Usually I have this stuff covered by inheritance or a component style approach. In your example instead of an interface, I prefer having a health component that only deals with health. And it fires off C# events for things like taking damage and death. Other components can listen for those events for customization purposes.

  • @junaidywijaya
    @junaidywijaya11 ай бұрын

    Just to say thanks and tell you, this way of teaching is really good for many reasons, not only explain the definition but also showing a real case scenario and after watching and searching other videos, this one is still the best one and easiest to understand, i do have watched your explanation about events and also delegates, but i forgot it sometimes and keeps coming back, so just want to say thanks for all the works you do, and i hope you found your success in your current project, and also i want to ask about planning for the future, any new paid course in udemy, i really wondering how to create the chart in your blueprint steam game, and how to manage those data, I've tried to make something similar but ended up a mess, i knew you are busy these days, and yeah I'm just mainly want to say thanks. 😅

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    11 ай бұрын

    It's perfectly okay to keep coming back as long as every time you come back it's easier to remember how it works. For example there are some things, like how to read a file, that I just google everytime because I never memorize it, but a quick google instantly makes me remember

  • @rutchjohnson
    @rutchjohnson4 жыл бұрын

    Wow, so powerful!

  • @zekiozdemir420
    @zekiozdemir4203 жыл бұрын

    thank youuu

  • @pamalott5
    @pamalott54 жыл бұрын

    I love your vids.

  • @mattshu
    @mattshu2 жыл бұрын

    This makes so much sense in Unity but I still have trouble grasping practical uses of interfaces in other coding situations outside of game making

  • @kken8766
    @kken87664 жыл бұрын

    good job!!

  • @erixperimentation4666
    @erixperimentation4666 Жыл бұрын

    With interfaces it isn't even "inherit" anyway, you *implement* interfaces, not inherit from them. C# is still only a single inheritance language, but it allows you to get around this limitation with it by implementing multiple interfaces.

  • @nickholmes3371
    @nickholmes33713 жыл бұрын

    How would this work with say, an overlap sphere (like checking for things damage by an explosion)?

  • @kanewadel
    @kanewadel2 жыл бұрын

    thanks

  • @leatherandpoemscharmyman5774
    @leatherandpoemscharmyman57743 жыл бұрын

    hey brother, does it useful for rts's games? such as whole click actions for several type of charactesr? I mean all my farmer, lumberjack and soldier must implemen a click movement? but some of them can grab resources and other must attack ? how to combine interfaces with polymorphism?? I guess.. It is been longtime I do not coding for years, I know a little. thx.

  • @thepolandman2447
    @thepolandman24473 жыл бұрын

    Very nice explanation! +1 Sub

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    3 жыл бұрын

    Thanks!

  • @arabianlegend5897
    @arabianlegend58972 жыл бұрын

    Hello Code Monkey! Thanks for the great tutorials man! I just had a curious question. At 11:45 you got the component even though you did not attach the IDamageable script to the gameobjects. Since Unity did not detect a "IDamageable" script component, does it try and get any other script in that gameobject that has inherited that "IDamageable" script? (in this case the "Enemy" or "Crate" script components) How does it work exactly? Also I am loving your Builder Defender course so far, keep producing great content!

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    2 жыл бұрын

    You cannot attach an interface directly since an interface isn't something you can instantiate by itself, instead you attach some script that implements the interface. Then using GetComponent it checks if any of the attached components implement that interface. I'm glad you're enjoying the course! Thanks!

  • @vojtechjezek7317

    @vojtechjezek7317

    9 ай бұрын

    Thanks for asking this, I was gonna ask the same question haha

  • @empressredbird
    @empressredbird Жыл бұрын

    very cool feature

  • @nabkawe
    @nabkawe2 жыл бұрын

    Man everyone focuses on the contract part, no one focuses on why would you care about it...thank you.

  • @Blu3W4r10Ck
    @Blu3W4r10Ck Жыл бұрын

    Every other tutorial explains them as just a contract that does nothing. Thank you for explaining an actual use case.

  • @moduntilitbreaks
    @moduntilitbreaks4 жыл бұрын

    Quality top as always(Y)

  • @brewstewfilms8752
    @brewstewfilms87524 жыл бұрын

    Thank you Code Monkey!

  • @jason_s3597
    @jason_s3597 Жыл бұрын

    U BEST!!!

  • @gamerboi6034
    @gamerboi60342 ай бұрын

    in your kitchen chaos course, did you use advance topics like inheritance, interfaces and polymorphism? i have learned them but I want to apply them in a game to get a better grip and get comfortable with them. looking forward to your reply.

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    2 ай бұрын

    Yup I did use those, inheritance on the various Counter types and interfaces to make objects grabbable. Also for a standalone demo you can look at my interaction system which is heavily based on interfaces unitycodemonkey.com/video.php?v=LdoImzaY6M4

  • @GreenCube-rt7cr
    @GreenCube-rt7cr7 ай бұрын

    Thanks

  • @CodeMonkeyUnity

    @CodeMonkeyUnity

    7 ай бұрын

    Thanks for the super thanks!

  • @rishibarathi1487
    @rishibarathi14874 жыл бұрын

    Please do a video on integrating admob to our games