Accessing blueprint instance data of dynamically spawned actor

I have a C++ class with an exposed UPROPERTY which is extended via a blueprint class. I used the blueprint to set the value of the property.

Now what I want to do is spawn an Actor from this blueprint class and have my C++ code work with the property that was set in the blueprint. All works well if I drag an instance of the blueprint class into the world from the unreal editor. However, if I dynamically spawn this actor of the same blueprint class from my default GameMode class, I can see that an instance of that class has been added into the world (I see it in the World Outliner) but when the C++ code runs, the values that were set from the blueprint are not there.

Why does spawning the blueprint class differently (one method by dragging it into the world from the editor, the other method by spawning it from the GameMode class) lead to different results? Why am I unable to access the blueprint data if the actor is spawned from the GameMode class?

You sure you spawning same class? Note that blueprint is class, same as C++ class, so blueprint from that C++ class and C++ class alone will behave differently, because they are different classes.

The solution is very simple. I wasn’t compiling the blueprint class after changing the exposed UPROPERTY value in the editor.