UProperty data persistence?

Hello, I’m working on a project in which I have a tiled map and each ‘tile’ is an actor with a custom component with a few uint16 values which are UProperty values with ‘EditAnywhere’ tags, as expected they function fine within the editor and have normal behaviour, but if I try to pull these values in C++ they still seem to be zero initialized.

For example, I have a uint16 property named example for sake of discussion, if I edit this example within the editor to 5 from 0 and then within my C++ source files I try to call the value of this object it is always zero, yet within the editor it is 5 and that seems to be saved and persistent. Basically as if it zero initialized and is not ‘syncing’ up with the editor.

I’m wondering if I’m doing something wrong or if I’m not understanding something about how unreal engine handles data persistence, I want the values that I change in the editor to match up with the C++ code.

Sorry if this is a stupid question.

You have to research about how instancing of classes work in UE4;
Judging by what you say, you are proly getting default values from a blueprint class instead of reading the values from the blueprint instance object.

But I’m not using blueprints at all right now, unless dragging a C++ class into the level turns it into a blueprint.

Sorry for the late reply, turns out this was my bad

I changed the datatype of the stored values after I made the object and entered in some values, and this wiped them to zero, after re-entering the values again in the editor it works as expected.