A pure function can even change data member’s value?

+This is what I have read in the document: “Pure Functions promise not to modify state or the members of the class in any way”
(Functions | Unreal Engine 4.27 Documentation
+But the example in the picture show that a function marked with pure can even change the member value and give no error
; Am I missing or misunderstand something ? please help

Pure functions in Blueprints isn’t strictly enforced unless you mark the function as const as well. It’s a weird quirk with Blueprints that’s been around for a long time (even present in UE5)

1 Like

thanks for your help :grinning:

Privacy & Terms