FNativeClassHeaderGenerator::ExportEnum produces this behavior.
If an enum has “MAX” somewhere in the array, it removes last element.
I tested my code to fix the issue.
// code placeholder bool UEnum::ContainsExistingMax() const { #if 1 // testcode const int32 LastElementIndex = Names.Num()-1; if (GetIndexByName(*GenerateFullEnumName(TEXT("MAX")), EGetByNameFlags::CaseSensitive) == LastElementIndex ) { return true; } FName MaxEnumItem = *GenerateFullEnumName(*(GenerateEnumPrefix() + TEXT("_MAX"))); if (GetIndexByName(MaxEnumItem, EGetByNameFlags::CaseSensitive) == LastElementIndex ) { return true; } #else if (GetIndexByName(*GenerateFullEnumName(TEXT("MAX")), EGetByNameFlags::CaseSensitive) != INDEX_NONE ) { return true; } FName MaxEnumItem = *GenerateFullEnumName(*(GenerateEnumPrefix() + TEXT("_MAX"))); if (GetIndexByName(MaxEnumItem, EGetByNameFlags::CaseSensitive) != != INDEX_NONE ) { return true; } #endif return false; }
The "Get number of entries" returns 4 in above example.
for example define enum with following code
UENUM(BlueprintType) enum class EMaxTest2 : uint8 { A, B, MAX, C };
UHT removes last element "C".
"Get number of entries" node returns 3.
UE-81742 DXGI_ERROR_INVALID_CALL
I am not able to find world outliner how to enable it?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
How can i modify the param name in EQS node
How does TextureRenderTarget2D get TArray<uint8> type data?
How does UMG set overlapping layouts?
How to convert the datasmith scene file to BluePrint. Create animations in BluePrint.
Delay nodes occasionally don't fire the "Completed" output in a nativized build
How to generate volume textures in UE4.27 C++ or Blueprints?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-82048 in the post.
0 |
Component | UE - Foundation - Core |
---|
Created | Oct 18, 2019 |
---|---|
Resolved | Aug 27, 2021 |
Updated | Aug 27, 2021 |