Small #UE5 #Blueprint tip :
You can use "validated get" to access an object ref with validation in only one node instead of the classic"IsValid? -> Get"
It improves BP readability a lot!
Small #UE5 #Blueprint tip :
You can use "validated get" to access an object ref with validation in only one node instead of the classic"IsValid? -> Get"
It improves BP readability a lot!
#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
PSA (corrections below): #UnrealEngine users, please know the wonders of TInlineComponentArray and the TInlineAllocator template. Life changing stuff right here. Stop using TArray GetComponents and other small temporary containers on the heap. Please. Put an end to needless memory fragmentation. Be enlightened by the efficiency of stack memory. There's still time for you to see the light. Image text in following posts...
#GameDev #UnrealDev #UnrealTips #UE4Study #UE5Study #UE4 #UE5 #UE #CPP #Programming
Don't forget to boost to help a fellow dev!
Edit: Made a correction to first example - according to my IDE it resolves to a move constructor, not a copy constructor. It's still the worst of these options, but not as egregious as I initially thought.
Edit 2: Another correction - the inline allocator is not always stack-specific! If declared as a member of something allocated on the heap (such as being a member in a UObject) the inline allocation will be bundled into that heap memory!
if u hold Down+B #unreal will compile shaders faster #unrealengine #unrealtips
this week i accidentally discovered the Quick Switcher in #unrealengine and now i have to fight desperately to remember to use it #unreal #unrealtips
Over time this one turned out as a best practice for me when it comes to working with actor references in blueprints in #UnrealEngine. The macro is setup quickly and can be extended later on easily. Check it out! 💥
💡 Follow for more #UnrealTips