I am spawning a BP (called BP_ObjectSpawner) at run time. The BP_ObjectSpawner is based on a C++ class (AObjectSpawner). The AObjectSpawner class has an array property of a custom struct type.
class AObjectSpawner: public AActor...
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
TArray<FCustomStruct> MyArrayOfStructs;
This array is populated in the BP_ObjectSpawner’s blueprint editor with a collection of these structs.
For thoroughness, the structs are BlueprintType and contain a TSubclassOf AActor type and an int32 number to spawn. The BP_ObjectSpawner iterates through this array on BeginPlay spawning X of Y.
My GameMode class has a property TSubclassOf AObjectSpawner, to which I’ve assigned the BP_ObjectSpawner type.
The GameMode successfully spawns the BP_ObjectSpawner, but the spawned BP_ObjectSpawner’s MyArrayOfStructs is empty.
I’m not sure what I’ve missed, would appreciate some guidance.