What are Interfaces? (C# Basics)

preview_player
Показать описание
👍 Learn to make awesome games step-by-step from start to finish.

✅ Let's learn all about Interfaces in C# and how they help us write cleaner code!

Learn Unity in 17 MINUTES!

Learn C# BASICS in 10 MINUTES!

What are Events? (C# Basics)

What are Delegates? (C# Basics, Lambda, Action, Func)

What are Interfaces? (C# Basics)

What are Generics? (C# Basics)

What are Loops? (C# Basics, for, while, do)

Unity Tips in 10 MINUTES!

Unity Basics for Beginners

3 Ways to Shoot Projectiles in Unity

Modular Character System

If you have any questions post them in the comments and I'll do my best to answer them.

See you next time!

#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.

--------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

🌐 Have you found the videos Helpful and Valuable?
Let's learn all about Interfaces in C# and how they help us write cleaner code!

CodeMonkeyUnity
Автор

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.

ArkyonVeil
Автор

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.

toastyshrimp
Автор

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!

titanicpat
Автор

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

iDigvijaysinhG
Автор

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!

explior
Автор

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!

RazixStyle
Автор

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.

leoking
Автор

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.

huyopo
Автор

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.

subliminalcastillo
Автор

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".

YuriST
Автор

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

nilsmuller-cleve
Автор

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.

williamjay
Автор

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

stellar
Автор

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!

chuckdude
Автор

"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!

charged
Автор

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

zildeos
Автор

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.

MichaelHeist
Автор

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

YuraBazhan
Автор

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

cwdgamedev