Is it possible to somehow get access from C++ to a user defined structure, created in blueprints, to create an array of it?
Thanks!
You could possibly make a TArray of UClass*, like this: TArray ClassArray;
The class in which you declare this will need several UClass* variables, each of which you select in blueprints. For example,
UClass* BPClass1;
UClass* BPClass2;
etc. Select these in the blueprint of the current class and you can do what you wish with the TArray in code. Like
ClassArray.Add(BPClass1);
ClassArray.Add(BPClass2);
for (auto i : ClassArray)
{
ClassArray[i]->Destroy();
}
for example.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “BlueprintClasses”)
UClass* BPClass1;]
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "BlueprintClasses")
UClass* BPClass2;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "BlueprintClasses")
TArray<UClass*> ClassArray;
ClassArray.Add(BPClass1);
ClassArray.Add(BPClass2);
for (auto i : ClassArray)
{
ClassArray[i]->Destroy();
}