How to call UFunctions in UStruct?

I am making UStructs inside c++ to encapsulate some data. I create everything on the stack to avoid garbage collection.

Is there any way to call functions on these structs inside blueprints?

I would like to either apply functions to them, or to groups of them. much like we apply logic to the math vector class.
I want to apply custom operations to the data inside and between them. or to call functions to convert the data to a new form without defining this logic in a separate static library.

Yes. You can create static UFUNCTIONs with BlueprintPure to perform operations with your UStructs. Keep in mind that by default, UStructs are passed by value and not reference. These functions should be created in their own class. For example, look at the KismetMathLibrary source.

In the event that you do not have the source, I found the files in Github for you.


Dude that is brilliant. Perfect for what I need!