Unfortunately we simply don't have the time and resources to make UHT work like a true compiler. UHT can currently parse the most common C++ syntax cases and that works for 95% of cases.
A project building in Visual Studio will sometimes fail with the error Unrecognized type 'FBar' - type must be a UCLASS, USTRUCT or UENUM. This can occur in situations where one struct was referenced by a second struct and both structs were changed so that the first struct now references the second, but only if the include pre-processor instruction includes a space (ie. "# include").
The user who reported the issue suspects that there is a problem with how FHeaderParser::SimplifiedClassParse handles the include instruction. The whitespace after the # seems to be throwing it off.
USTRUCT()
struct FFoo {
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Foo")
bool bRepro;
};
USTRUCT()
struct FBar {
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Bar")
TArray<FFoo> Foos;
};
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Bar")
bool bRepro;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Foo")
TArray<FBar> Bars;
RESULT:
The build fails with the error: Unrecognized type 'FBar' - type must be a UCLASS, USTRUCT or UENUM
EXPECTED:
The build succeeds since a space in the include pre-processor instruction should not affect the instruction.
I am not able to find world outliner how to enable it?
When I open UE4 4.24.3 it appears that. Does anyone know how to solve?
Delay nodes occasionally don't fire the "Completed" output in a nativized build
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
How can i modify the param name in EQS node
How to achieve HLSL Multiple Render Target in Material blueprints?
How does TextureRenderTarget2D get TArray<uint8> type data?
What method is used to fill polygonal regions when drawing spline mesh at run time?
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.12.5, 4.13, 4.14 |
Target Fix | 4.14 |
Created | Sep 23, 2016 |
---|---|
Resolved | Sep 29, 2016 |
Updated | Apr 27, 2018 |