The documentation in ObjectBase.h is lacking to say the least…
// These macros wrap metadata parsed by the Unreal Header Tool, and are otherwise
// ignored when code containing them is compiled by the C++ compiler
#define UPROPERTY(...)
#define UFUNCTION(...)
#define USTRUCT(...)
#define UMETA(...)
#define UPARAM(...)
#define UENUM(...)
#define UDELEGATE(...)
How do I get a list of, and interact with the UProperties exposed by a UObject? I feel like I’d be able to figure it out by looking at how the SaveGame key is handled, and I’ll reply here if I do, but if someone could answer faster than I can figure it out that’d be great
for (TFieldIterator<UProperty> It(Object->GetClass()); It; ++It)
{
UProperty* Prop = *It;
Then use SetPropertyValue* / GetPropertyValue* functions to set/get values. Prop->GetName()/GetFName() gets the property name. Also have a look at UnrealType.h where all the functions are declared.
GetPropertyValue <- A is the address of the property value (so the address where the property inside the Object is located)
GetPropertyValue_InContainer <- you might want to use this, as you just need to pass the Object pointer here, the property value address inside the object will be automatically calculated for you