You can’t create an instance of a structure inside that very structure, it’s completely understandable, as such action would fill the entire memory recursively upon object creation.
However you also can’t create an array of a structure inside itself, even though the aforementioned problem doesn’t exist - upon adding an element to that array, a new empty array would be spawned inside the child object and that would be it.
Since that option is not available in Blueprints’ Structure creator, I tried to create the struct with C++:
USTRUCT()
struct FCorridorData
{
GENERATED_BODY()
UPROPERTY()
uint8 Length = 0;
UPROPERTY()
TArray<FCorridorData> ChildCorridors;
};
However the compiler will throw an error:
Struct recursion via arrays is unsupported for properties.
But why? Having an ability to create child structures in property editor would enable nesting, useful in creation a lot of stuff, i.e. mazes or vent systems as tools for artists.