UHT will fail during build in Visual Studio if a function tries to return a UEnum pointer. Adding a valid keyword before the return type will compile successfully.
UENUM(BlueprintType) enum class ETestEnum : uint8 { ONE, TWO, THREE, FOUR, FIVE };
RESULT:
The build fails with the following error: error : 'Enum' is not allowed here
EXPECTED:
The build completes successfully.
WORKAROUND:
Add any valid keyword before the return type (eg. const UEnum* SomeFunc() const;) and the build will complete successfully.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-55924 in the post.
0 |
Component | UE - Foundation - Cpp Tools - UnrealHeaderTool |
---|---|
Affects Versions | 4.17.2, 4.18.3, 4.20 |
Target Fix | 4.20 |
Created | Mar 7, 2018 |
---|---|
Resolved | Mar 19, 2018 |
Updated | May 31, 2018 |
4545 - projectgheist |