Set values using Property System (Reflection)

Bionic_Ape
Tue, 05 Oct 2021 08:13:56 +0000
Rendering

Hi,

It’s about the same problem of another question that I asked but I’m going to try to frame it differently:

I have strings with values that can be floats, int32s, object references, FStrings or FNames. I know how to cast the FProperty so I get the correct type, but then I don’t know how to set it to the object that has that FProperties.

I’ve seen some examples in the engine, but ultimately they use a uint8* that I assume it is the actual address of the property of the object in memory. Am I right? How can I get that? Is SetPropertyValue and SetPropertyValue_InContainer the way to go?

How can I get an UObject, get all the FProperties, cast those FProperties to FStrProperty, FObjectProperty, FFloatProperty and so on, and then set the value to the instance of that UObject?

Thanks!

3 posts - 2 participants