UBT can't parse nested template parameters

The Unreal Build Tool can’t handle properties like this:

UPROPERTY(EditAnywhere, Category = MapSetup)
TArray<TSubclassOf<AMapPiece>> KeyAreas;

I have been ignoring this and just using UClass* instead. However, I have now hit this problem with an array of enums (to work around the fact that I can’t use enum bit flags):

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Setup)
TArray<TEnumAsByte<eExits>> ExitsList;

This generates the following error:

In MapPiece: Missing '>' in TEnumAsByte

If I remove the TEnumAsByte it says I can’t have a raw enum.

Actually, it can, as of this commit:

https://github.com/EpicGames/UnrealEngine/commit/90c50e0b3b07bf44dad704d100889d3f51674699

I don’t know version you are using though. But the redundant space (only the closing space is required, really) should work in any case.

Steve

Try putting spaces around the inner set of pointy braces, UHT currently can’t handle parsing >> correctly in the context of templates.

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Setup)
TArray< TEnumAsByte<eExits> > ExitsList;