I’m… still quite stumped as to how to pull it all together, to be quite honest.
I have an idea of how it’s supposed to work now, yes, but this code makes my brain hurt.
Hell, my gut tells me I’m not even iterating the actual spawned version.
I might be wrong, but that’s what my gut tells me…
UBlueprint* BPtoUse = NULL;
BPtoUse = HammUErSettings::FindInBPDatabase("logic_auto"); // the BP we want to modify
UUserDefinedStruct* UDStoUse = NULL;
UDStoUse = HammUErSettings::FindInUDSDatabase("hammeroutput"); // the definition of the struct we'll need to fill
if (BPtoUse && UDStoUse)
TSubclassOf<AActor> BPClass = (UClass*)BPtoUse->GeneratedClass;
AActor* LogicAutoActor = editorWorld->SpawnActor<AActor>(BPClass, FAS);
for (TFieldIterator<UProperty> PropIt(LogicAutoActor->GetClass()); PropIt; ++PropIt)
UProperty* Property = *PropIt;
FString PropertyName = Property->GetName();
if (PropertyName == "HammerOutputs")
// now what? Am I even touching the actual LogicAutoActor? how the hell do I declare an array of UDStoUse and fill it, then assign it?
For context, Logic_Auto is a blueprint with a HammerOutputs array of HammerOutput structs (defined in-editor as a UserDefinedStruct consisting of FStrings, a float and a bool) that I want to declare and fill in code.