👋Hello, hello! I'm Kamil and this is Random Games Generator where we create games.
✅In this Unreal Engine 5 beginner-intermidiate blueprint class I'm gonna show you why using casting in your games is not always the best idea (works in the same exact way in Unreal Engine 4 so don't worry if you haven't switched to UE5 yet).
✅I will also show you probably THE BEST WAY of replacing casting in your project.
✅At the end I will give you a hendful of useful tips to keep in mind while using Blueprint Interfaces in your game projects.
⏲️TLDR:
Blueprints interfaces are messangers between blueprints;
create Blueprint Interface (call it BI_[name] or BPI_[name]);
add it in Class Settings of reciving blueprint;
create message inside BI;
send message directly from other blueprint without the need of casting;
using BI makes your Blueprints sooo much lighter;
you're awesome;
seriously - you are;
I'm not kidding - SMILE!
💚🎮Wishlist my game (not the one from tutorial ;)) on STEAM:
https://store.steampowered.com/app/22...
🐦Follow me on Twitter:
/ randomgamesgen1
🅵 and Facebook
https://www.facebook.com/profile.php?...
for WIP shots from my projects! 📸
👍 Like and 🔁 share if you want to see more content like that in the future SUBSCRIBE!
Chapters:
00:00 - Intro
00:51 - How heavy is a clean Widget? (spoiler: light)
01:16 - Casting example implementation
03:11 - How heavy is our Widget with casting? (spoiler: heavy)
03:35 - Why casting is BAD idea?
05:00 - Intro to Blueprint Interfaces
05:58 - Implementing basic Blueprint Interface
10:48 - How heavy is Widget after replacing casting with BPI? (spoiler: light again)
11:18 - Implementing Getters for health and Setters for actors;
18:55 - Size of widge after adding bonus functionality (spoiler: still light)
19:05 - One message, two different reactions
20:24 - Only actor with interface can get a message
22:40 - Tip 1: Don't do Huuuge BP Interfaces!
23:25 - Tip 2: When casting is OK?
23:45 - Tip 3: Don't put BPI where you won't use them!
24:12 - Tip 4: Create separate BPI's for every type of communication!
24:22 - Tip 5: Debuggin BPI is pain!
25:32 - Tip 6: If you won't implement even/function it won't fire
26:12 - Tip 7: ALWAYS do categories to avoid mess!
28:35 - Summary
C'ya later!