#UnrealTips: Toggle Node Purity! Gets and Casts have both pure and impure forms. Right click the node and you'll see an option for it.
Stop using IsValid where possible. Convert get nodes to impure get nodes if you need to branch on their validity.
Need to check if something can be casted as a bool? Or maybe you don't care if the cast fails? Convert it to a pure cast node!
Performance Note: Impure nodes get re-evaluated for each exec node input pin that depends upon them, so if the outputs of the pure node are relatively expensive (such as casting or non-trivial functions) and getting reused a lot in the same execution chain, consider using a macro to explicitly cache it (I've added an image), or just stick with the impure cast.
I'm not saying you should always change node purity, but doing so can make your graphs a lot more readable!
(and don't forget to boost if you want others to see this!)
#GameDev #UnrealDev #Blueprint #UE #UnrealEngine #UE4 #UE5 #UnrealEngine4 #UnrealEngine5