Can use use inheritence with UStructs?

Is inheritance supported by UStructs?

I need an array of items of different types (like a data structure for a parser).

I created a UStruct base class plus few child classes. I then create an array of base structs and fill it with child structs. It all compiles, but then I have problems: there is no cast for structs in blueprints and I cannot return a pointer to a UStruct too.

Should I use UObjects instead or it’s too heavy?

Pointers to structs aren’t support by the Unreal Reflection System, so they also aren’t support by Blueprints.

You can have pointers to structs in C++, but you can’t mark them as UPROPERTY(). You probably should be using classes inheriting from UObject.