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.
How does TextureRenderTarget2D get TArray<uint8> type data?
Why does the REMOVE method of map container remove elements have memory leaks?
What is the difference between Camera and CineCamera?
How do I set a material as a post-processing material?
How to delete some elements correctly when deleting an array loop?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
UMG RichText not appear image when packaged
How does TArray loop correctly remove elements in blueprints?
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 |