This page claims: “Caveat: Unlike TArray, TSets (and TMaps) are not directly supported as UPROPERTYs and so cannot be automatically replicated, serialized, etc…” and “Like the TSet, the TMap cannot be declared as a UPROPERTY.”
Thus I was surprised to write this line of code inside a UCLASS for a faction system and discover that it compiles just fine:
UPROPERTY() TMap<const UPlayerFaction*, float> FactionAttitude;
Is that documentation page out of date? Or is it that I’ll suffer horrible attacks from subtle save/load bugs later on if I try to use that for game serialization?
Certainly I could go write my own serializer for the map data, but I’d rather not if I don’t have to!