UFUNCTION in USTRUCT?

Reflection system does not support functions in struct, Even thru in C++ class and structs are practically have same capabilities as class, UE4 conventions limits structs to only contain data structures… actually giving structs more sense of existence. Ofcorse non-reflected function in structs will normally work in C++, in fact you can find examples of that in UE4, most notably FVector and FRotator

Common practice in UE4 in case of blueprint node can’t be contained in type that it is operating (exacly like FVector) is to create static functions is some class. You can use const FSomeStruct& argument type to make input pin that modifies inputed structure directly

2 Likes