Hi,
I’m trying to create a c++ struct like so:
USTRUCT(BlueprintType)
struct A{
B* var;
}
USTRUCT(BlueprintType)
struct B{
TArray<A> var;
}
but when I try to compile, UE tells me that B is an undeclared type. So I tried to forward declare the structs but it didnt’ work because if I add USTRUCT(BlueprintType), UE tells me that it’s missing an {.
I’ve looked at the other posts and at Rama’s tutorial on the wiki, but couldn’t understand how to do it.
My objective is to create a struct that includes other instances of it inside. However, as I know that UE4 doesn’t support it, I did it like this. Is there any other way? Or is it possible to forward declare correctly a USTRUCT in unreal engine?
Thanks in advance.