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?