Why Use 'Interfaces' & 'Event Dispatchers' in Unreal Engine | UE5 Explained

preview_player
Показать описание
Interfaces & Event Dispatchers are both methods of enabling decoupled communication between different parts of your game.

Understanding them is essential for writing clean and well structured code.

This video explains both interfaces and event dispatchers, when to use them, and most importantly, why use them at all.

Sign up for the free chat bot trial:

Download the project files and support my channel on Patreon

Join my Discord server to chat and mingle with the community

Chapters:
00:00 Intro
00:28 Do you have questions?
00:57 Interfaces Overview
02:44 Interfaces Example
07:32 What happens if we don't use interfaces?
09:52 Is casting always bad?
12:13 Interfaces Summary
12:37 Event Dispatchers Overview
13:47 Event Dispatchers Example
19:24 Event Dispatchers Summary
20:42 Still have questions?
21:27 Outro

About me:
I've been learning game development for a few years now, I have a background in software engineering, and I also have a background in education, so being able to combine my love of gaming, software engineering and education is the best way to spend my time.

I am currently working on a few unreal engine games as a hobby, but I am also trying to build a community, thus I am creating YouTube tutorials to find others who are interested in game development and design.

#unrealengine5 #interfaces #eventdispatchers #tutorial #unrealengine #ue5 #gamedev #softwaredesign #software #designpatterns #cleancode #blueprints #indiegame #indiegamedev
Рекомендации по теме
Комментарии
Автор

I appreciate how instead of just saying "avoid casting", you actually show the reason why. Everything is very well explained and thought out.

As they say, it takes a smart guy to explain to someone how something works, it takes a genius to make them understand.

Seem_gDev
Автор

dude plz dont stop u explain shit step by step, u actually made me understand so much shit i was strugglin with...keep it up like this

caramanzilias
Автор

This video is the best explanation of interfaces I ever witnessed, you're doing a great work of presenting these concepts and making it easy to understand !

TheVeryMadMath
Автор

I absolutely love that you are teaching exactly at my level: Not too cuddly, but also not assuming I write C++ all day. Absolutely. Fantastic. Work.

FluteboxFan
Автор

This might actually be one of the most important videos ever made in the history of Unreal development videos. It is the best explanation of how casting can be bad I have ever seen. Also that is a brilliant way of using Event Dispatchers. As opposed to the most common way which involves manually binding. Absolutely brilliant.

hardwiretoo
Автор

Finally a tutorial where the reason behind avoiding casting isn't glossed over. Always had to take that info at face value without being able to really question it. You explained it very well and concisely!

patmacalister
Автор

bro, let me tell you it is a TALENT to be able to take knowledge, and then structure it in a way that is understandable and teach it to students trying to understand and learn, but YOU have a gift of doing this VERY VERY well. I know you hear this a lot but seriously, this is your calling and the way you've been able to do it is just insane, and i've watched ALL your videos, this isn't just a compliment, this is a huge push for you to really devote yourself to becoming an instructor because you are insanely good at this, you may not think much of it, but look at the quality of your comments on all videos, it is nothing but the highest of praise instead of a bunch of irrelevant talk among viewers. I watch a lot of people attempt to be instructors but they all just read from a wikipedia page or straight from a source, without any type of conversion whatsoever, and because of that maybe only 40% can somewhat comprehend. but in your case you are able to do it so 100% can understand and i don't say all this lightly.

Seriously, your channel has grown FAST. other tutorial channels struggle to break 10K after a few years!!! and you're already past 30k, and all this is on a channel with your name on it, instead of a catchier channel name lol! but i really hope you devote yourself to this completely, because WE WILL support you if you step up and become a full time instructor!! One of the most important and valuable professions on this planet is that of an instructor as it's a difficult job to truly grasp and you've got it in all areas!!

Dominicn
Автор

You are one of the few explainig the WHYs in Unreal. Not only copy and paste stuff, but really in depth explanation of the logic behind. Thank you so much!

bouldouklu
Автор

Very nice tutorial, as always. However, there is one things, I'd like to add.
When thinking about casting:
When you have to cast it is always helpful to consider which is the most simple object in the class hierachy, that serves your purpose.
Example:
You have a character class called "NPC" and you have a reference to it as an actor in another class. If you want to play an Animation Montage on it for example, you need to only cast to the character class to get the skeletal mesh, instead of loading in the whole "NPC"-class by casting to that one.
(Note: You need a skeletal mesh to play an animation on a character)

revan
Автор

You really are one of the best educators for Unreal. Not too much handholding but rather important information about good practices that are useful for any project. Thanks so much :)

drinkwwwaterrr
Автор

You know what? I started unreal some time back and at the beginning I had no idea of it and used random yt tutorials which lead to me ending up with a "ton of casting inside the event ticker". But then I found your channel and all of a sudden my game actually works and has very good performance! <3

etherialwell
Автор

As usual, your video is super clear and answer the very question I was asking myself.. It is very helpfull to have you on Youtube !

AmadeusCraft
Автор

you are one of the premier UE guys on youtube. thank you!

forgiven
Автор

Thank you for explaining about when casting is ok.

Another way of thinking about casting. It's ok to cast to something that is always loaded to memory (player, controller, game mode etc)

blindphoenix
Автор

The best explanation I ever saw regarding the 2 options. I prefer Event Dispatcher for the flexibility and seems easier to understand.

ztormsink
Автор

I never really understood event dispatchers before, thank you so much for making this amazing tutorial!!!! God bless!!!

arcturus
Автор

Best tutorial on youtube, please keep doing tutorials like this

RushedYT
Автор

Another banger. You are by far the best Unreal teacher on YouTube (and the paid sites tbf). Hoping you eventually do some videos on GAS/ALS/Motion Matching. Keep up the great work!

alexjohnson
Автор

This is by far the best explination for event dispatchers as Unreal's docs doesn't explain them well.

DrNVA.
Автор

I am studying ACS architecture.
(attach System component) and this was very useful to me because there is very little information about it.

Thank you for your great contribution Eli.

I know that one day it will be the ACS pattern's turn.

DsDylan-fslo