How to use Tags instead of Casting node | Unreal Engine 5 Tutorial

preview_player
Показать описание
Unreal Engine Blueprints Optimization Course 50% OFF!
Coupon expires on: 15th April 2025!
-------------------------------------------------------------------------------------------------------------------------
Unreal Engine 5 Creating Main Menu Course 50% OFF!
Coupon expires on: 15th April 2025!
-------------------------------------------------------------------------------------------------------------------------
FREE 2D/3D Assets for Commercial Use
-------------------------------------------------------------------------------------------------------------------------
FAB:

FPS Doors Pack

Gameplay Ability System ( GAS ) Blueprints

Endless Runner Mega Template
-------------------------------------------------------------------------------------------------------------------------
Support me:
-------------------------------------------------------------------------------------------------------------------------
Join our community:
-------------------------------------------------------------------------------------------------------------------------

#unrealengine #ITeachWithUdemy #udemy #udemycoupon #gamedev
Рекомендации по теме
Комментарии
Автор

In two months it will be a year since I started working with Unreal Engine, and your video of alternatives for casting is helping me a lot, thank you very much.

Walison_
Автор

I've never used Unreal but I like the presentation a lot.

blossomcherrypink
Автор

Just to add when to use casting:
Casting is for working with classes and inheritance. So if a child class has a function you want to call, you have to cast to that child class, before being able to call that function.

SellusionStar
Автор

Okay but how is this better for performance than casting? That part is never really explained. If casting is hard on performance, why isn’t ActorHasTag not heavy as well?

prazegod
Автор

Are you concerned about memory performance or execution time. I think the overhead of a cast is pretty low, but if the casted function is a blueprint function the references are what get you in trouble. I have remedied this in the past by using a base c++ class that has the interface of functions you want to call in blueprint. This way a cast doesn't pull in a bunch of blueprint references but you can still use the interface. I think this approach is definitely viable, and clever, but I do think eventually you run into limitations.

CastorX
Автор

U got a subscriber Sir, nice viedos, keep it up

ankitsharma-udtq
Автор

But, usually you need to do some action on destroyed object like make it fire, make it fall, make it play some animation, etc. It is usually not enough just remove it.

ATomCzech
Автор

I heard if the casting is directed to something that will always loaded in the game such as your character, its fine to just keep casting that particular thing.
But if its temporary things like normal enemies, once you cast it will still stay in the system and eat up the memory.

tuwumuch
Автор

My 2 cents: Join Branch with 'clear and Invalidate' and skip one step.
Its necessary 'Clear' after one single loop ?

DailyPaily
Автор

Thanks for this Tutorials. I Have been trying not to use Cast To Node, but in some cases when I need, for example, take the player controller from my CharacterBp, using a Bp_VariableStorage placed in the level as a unique ref "get a copy= 0" and trying to get from it the variable Ref_PlayerController set inside is not working... maybe I'm doing something wrong but the Bp_interface works well to set an specific variable created before. Should I set this In Construct Scrip as a solution??? Thanks again!

jhonyfernandez
Автор

it is usefull for destroying actor but actors contain code you cant perform without casting

newwonderer
Автор

I need some properties of my character class on the actor class. How can I access those values without casting? Do you have any idea? I used Interface with character reference, but it behaved same as casting, because it is hard reference as well

nastenkaoo
Автор

How about using HasInterface? Does it cost more than HasTag?

RobertBojor
join shbcf.ru