I found a video called "Learn why you should NEVER use Casting in Unreal Engine" (How true is this ?)

When you need a lot of casts (not to base classes) you sometimes just want to split up functionality into new classes or components, as that can often reduce casts count. Casting to the engine classes is still very common and there is nothing wrong with it. When using interfaces (as a best practice for decoupling) you are going to be casting as well.

Youtube videos are 99.9% clickbait. It’s expected to see a large increase in memory when a class you are loading into memory holds hard references to other classes / assets. Say a blueprint has a property / node referencing a class / texture / sound / level and so on through a HARD reference, they will be loaded into memory immediately (and recursively) when that class is loaded into memory. This is why people use soft references, which are nothing but paths that can be loaded on demand.

@catz111 that would be shocking. I think it’s loading something recursively through a property / component / etc that looks innocent but isn’t. Like a datatable reference holding hard pointers to other things like textures.

All about Soft and Weak pointers | Tutorial

The real problem of blueprint CastTo - #2 by Roy_Wierer.Seda145

Blueprint interface VS ActorComponent, The Good And The Bad

Die to Survive - Railshooter - #240 by Roy_Wierer.Seda145

1 Like