Casting vs Blueprint Interface: When should I use each one? - With Interactive Door Examples

  Рет қаралды 1,249

NumenBrothers

NumenBrothers

Күн бұрын

This episode answers the common question, "When do I use casting to communicate between blueprints, and when do I use a blueprint interface?"
Also a quick tutorial on how to make a door open and close properly via Timeline and an overlap collision box.
0:00 Quick answer
0:58 Setting up the door via a Timeline
3:42 Casting
6:07 Blueprint interfaces

Пікірлер: 21
@DoctorMGL
@DoctorMGL 4 ай бұрын
casting render the entire blueprint before you can use it, in case of large blueprints casting them will consume more which is bad for your game optimization in other hand, interfaces allow you to call only certain parts you specify, which is great for performance
@truespiritualmeditation
@truespiritualmeditation 3 ай бұрын
Good to know... Seems that casting is inefficient as code also, look like you would create a lot of repeated code using casting?
@Yggdrasil777
@Yggdrasil777 4 ай бұрын
Very nice explanation with a good example for casting and interface.
@GeneralNovais
@GeneralNovais 3 ай бұрын
The problem with CAST TO is that, even when the objects are not interacting, Unreal loads the object into memory together. For example, if you have a CAST TO door on your character, your character will be loaded into memory and the door's BP will also be loaded into memory, even if you are never interacting with it.
@chrum91
@chrum91 4 ай бұрын
This is a fantastic example of interfacing. Would you use interfaces to grab information from other blueprints or casting?
@NumenBrothers
@NumenBrothers 4 ай бұрын
You can do either one- again it comes down to, do you know the specific actor in which you are communicating? If not, use an interface, and pass that specific information through the interface via Inputs (variables on the interface) and then implement the interface (as event) on any/all possible receiving actors
@TheSebledingue
@TheSebledingue 4 ай бұрын
Thank you very much
@truespiritualmeditation
@truespiritualmeditation 3 ай бұрын
As a programmer in PHP and a few others it seems to me that an interface would be similar to building a function? To express this in hybrid way, for example... lets say you made a survival type game and there were 100 different items you can pick up. Weapons, food, wood, rocks, plants etc etc. INTERFACES seems to me like... If it were possible to write a game in PHP, I would create a function (one block of code) and send to that block the variable values it needs, and then ask that code to detect and reference each object and then use an array, to store all the values for each object..... Which would be way more efficient.... But CASTING seems like I would have to write a block of code for each of the 100 possible objects?.... Am I understanding this correctly?
@NumenBrothers
@NumenBrothers 3 ай бұрын
Yes correct!
@truespiritualmeditation
@truespiritualmeditation 3 ай бұрын
Wrote this before watching the rest of the video... you basically say that LOL. Thanks. @@NumenBrothers
@user-ch3jv5pk4o
@user-ch3jv5pk4o 4 ай бұрын
I have a nice lesson for you too: press Ctrl-Shift-W, set scale to 1.4-1.5 and your videos instantly become useful even in resolutions lower than 4K.
@MaxStudioCG2023
@MaxStudioCG2023 4 ай бұрын
hey man how did you learned all those unreal codes? and not reffering to this doors :)) ...i have 1 and hafe year learning and i still watching tutorials to make stuff :l i dont know if this is the learning process taking so long or is just me stupid haha :)))) ...i mean i do stuff (like als some fight things posted some on my youtube ) but yea watching videos and folowing tuts.... :D
@NumenBrothers
@NumenBrothers 4 ай бұрын
It's like learning a language. How long did it take you to learn your first language? How did you do it? You don't even realize it as you're doing it, but your mind is building a map from the ground up, such that you get to a point where it's like riding a bike- your mind is automatically trained to reach for the right word, the right phrase, or the right function to implement into reality that which was just a figment of your imagination a moment before. I recommend starting with disciplining yourself- a minimum of 1 hour a day of game dev, and just keep going. Because you will get to the point where it starts to flow naturally, and if that happens, most likely you will love it. But also sometimes the best approach is to move sideways- completely counterintuitively. Perhaps a topic that has nothing to do with game dev, which you can then marry to your creative efforts in game dev. I suspect the most successful game developers will have loves that fall well outside the realm of game dev that they can bring to the game dev arena to bring forth completely original forms and ideas in the arena of the game.
@MaxStudioCG2023
@MaxStudioCG2023 4 ай бұрын
@@NumenBrothers haha thanks for the anser ....i do like all day of UE5 dev ..ofcource stuff in real life also but most of time on game dev lately :)))) ...haha and speaking of languages i learned my firs language (spanish) in like hafe year spoke and whriten ,english toke me longer haha :D ......but game dev definetly will take longer :))) (for example in my project i want to make a new skill like something where character flash true his target multiple times from side to side and each time dealing damage like a super skill i dont event know where to start :))))) searching for tutorials that dont exist (i saw some trailers where people used 1 or 2 animations for that basicaly needing some calculation to place the player from 1 side to other side and spawn it few times with some flash dissapear and like leaving a trail behind reappearing the other side and so on :D ....but yea keep searching :)) ...and yes you right is like riding a bike but this bike is like a spaceshipp ... :D
@NumenBrothers
@NumenBrothers 4 ай бұрын
the best guy I know for learning Niagara is @Tharlevfx
@MaxStudioCG2023
@MaxStudioCG2023 4 ай бұрын
@@NumenBrothers thanks but i dont think i need niagara ...more like the coding part (for effects i have enough niagara and other effects)
@user-ch3jv5pk4o
@user-ch3jv5pk4o 4 ай бұрын
@@NumenBrothers @Tharlevfx knows Niagara pretty well but unfortunately his teaching skills lower than zero.
@user-gg4lt6ym1p
@user-gg4lt6ym1p 3 ай бұрын
do u have paid courses?
@NumenBrothers
@NumenBrothers 3 ай бұрын
nope- this is something I do for fun
The Five Most Useful Features of Modeling Mode - Unreal Engine 5
3:25
Glow Stick Secret (part 2) 😱 #shorts
00:33
Mr DegrEE
Рет қаралды 51 МЛН
ХОТЯ БЫ КИНОДА 2 - официальный фильм
1:35:34
ХОТЯ БЫ В КИНО
Рет қаралды 1,5 МЛН
The Noodle Stamp Secret 😱 #shorts
00:30
Mr DegrEE
Рет қаралды 64 МЛН
Let's all try it too‼︎#magic#tenge
00:26
Nonomen ノノメン
Рет қаралды 55 МЛН
Moss Generator Blueprint(Works in Unreal Engine 5,1)
3:17
akram kasravi
Рет қаралды 15 М.
We NEEDED this. And it WORKED! - Sea of Thieves.
9:04
Captain Falcore
Рет қаралды 42 М.
Radial Force Component - Quick Blueprint Tutorial
6:38
NumenBrothers
Рет қаралды 603
My Top 10 OBSCURE Unreal Engine 5 Tips and Tricks
5:55
NumenBrothers
Рет қаралды 778
Foliage Variation Tutorial - Megascans Foliage Assets
2:58
NumenBrothers
Рет қаралды 590
What Makes a Great Game? - 3 - Autodidacticism
31:16
NumenBrothers
Рет қаралды 270
When, How, and Why to Use the Game State
4:26
NumenBrothers
Рет қаралды 523
Turning an Optical Illusion Into a Playable Character
22:39
ByteBlox
Рет қаралды 90 М.
Битва блоков в Майнкрафт 3
1:00
Домичек
Рет қаралды 885 М.
BRONZE TO GRANDMASTER SKILL IN REAL lIFE
0:17
FRN PLAYER 444
Рет қаралды 130 МЛН
Frog Prince Rush With Herobrine and Entity
0:32
Realistic Craft
Рет қаралды 50 МЛН