How can I use an UENUM in a TArray?

TArray<EnumAsByte> m_MyArray;

This should be the correct syntax but I get an error that the enum has no end bracket ‘>’. My current solution to this problem is having a TArray instead and static_cast:ing the elements to my UENUM-types.

This works fine in code, but I want it to be easily accessible in Blueprint.

Do anyone know if having an UENUM in a TArray is possible?

What happens with this:

TArray< EnumAsByte<MyEnum> > m_MyArray;

UHT currently can’t handle arrays ending with >> (we have an internal bug about this).

It works perfectly. Thanks a lot, Jamie! <3