UFUNCTION() UPROPERTY() USTRUCT() etc macros, where is the documentation

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(...)

Please try searching the documentation at Unreal Engine 4 Documentation | Unreal Engine Documentation for these keywords. If you don’t find the information you are looking for, please respond with what questions you still have.

what are the parameters these macros take?

Its actually there in ObjectBase.h if you look directly under what you posted.

namespace UC
	// valid keywords for the UCLASS macro

Theres numerous namespaces there all reasonably documented.

**Edit: **Gameplay Architecture | Unreal Engine Documentation

Oh, derp.

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 :slight_smile:

Try this:

	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.

SetPropertyValue takes a void* A, would that be the pointer to the UProperty?

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

Get/SetPropertyValue_InContainer were what I was looking for, thanks.