This issue has been closed as 'Won't Fix' due to an extended period of time without updates. If this issue is important to you please let us know by posting on the AnswerHub or UDN, and Epic will re-open the ticket for further review.
If an Enum is defined in ClassA and ClassA is included into the Project.h file, having a UFUNCTION in ClassB that takes the enum as a parameter will fail compile. Only by adding an include statement for ClassA inside of ClassB will the code compile
This is inconsistent with a non-UFUNCTION or UPROPERTY which will compile without issue.
UENUM(BlueprintType) enum class ETeam : uint8 { None UMETA(DisplayName = "None"), Players UMETA(DisplayName = "Players"), Neutrals UMETA(DisplayName = "Neutrals"), Enemies UMETA(DisplayName = "Enemies") };
UFUNCTION(BlueprintCallable, Category = "AmmoReserve")
bool CanDamageTeam(ETeam Teams);
Result:
Project fails to compile by saying "Unrecognized type 'ETeam ' - type must be a UCLASS, USTRUCT or UENUM"
How to delete some elements correctly when deleting an array loop?
Why does the REMOVE method of map container remove elements have memory leaks?
How does TextureRenderTarget2D get TArray<uint8> type data?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
Error EU-FA-31003 when trying to download the new preview
How to convert the datasmith scene file to BluePrint. Create animations in BluePrint.
Head over to the existing Questions & Answers thread and let us know what's up.
13 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.11.2 |
Created | May 25, 2016 |
---|---|
Resolved | Mar 26, 2018 |
Updated | Apr 27, 2018 |