If you have been using Unreal Engine for a while, you may have heard some negative opinions on casting nodes. But are they really that bad? In this quick tutorial, we’ll break that down!
Cast nodes allow you to communicate with other blueprints and use all the information inside that blueprint. They create something called a hard reference, when an asset is dependent on another asset, This means whenever that asset is loaded, all assets with hard references to that asset are loaded into memory. All in all, cast nodes create hard references which means increased memory consumption. If the chain of references becomes long enough, it will start to cause performance issues.
It does give them quite a bad reputation however, they are really not that bad! Some blueprints will almost always rely on other blueprints, such as a player character will most likely have hard references to their accompanying animation blueprints. This means, using a cast node to an animation blueprint won’t impact you any more than not using one, if there is already a hard reference there.
So to summarise, avoid using hard references where you can and always substitute them with an alternative if there is one, such as blueprint interfaces, but if you do end up having to use a cast node, don’t worry about it. It will only start impacting performance if the chain really starts to grow, but try to keep these cast nodes in already hard-referenced blueprints.
Check out some of the other great tutorials on CGHero.
Looking for assistance with your next project? Post your project and receive quotes from our Heroes.Post Your Project
We are looking for talented freelance artists with a passion for producing cutting-edge 3D CGI content.Become a CGHero