Repro Rate: 3/3
This issue occurs in the live build //UE5/Release-5.1 at CL 23058290.
This issue has also been regression tested against //UE5/Release-5.0 at CL 20979098 and is confirmed to be a regression since the issue did not occur in this build.
Customer comments:
This is a problem only with the new C# based UHT that comes with 5.1. This is code that has compiled fine since UE4.Disabling the new UHT using this made my code compile again. <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration"> <UEBuildConfiguration> <bUseBuiltInUnrealHeaderTool>false</bUseBuiltInUnrealHeaderTool> </UEBuildConfiguration> </Configuration>
Steps:
#pragma once
#include "ClassA.generated.h"
UCLASS(BlueprintType, Blueprintable)
class BLANK_API UClassA : public UObject
{
GENERATED_BODY()
public:
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FSomeDelegate);
};
#pragma once
#include "ClassA.h"
#include "ClassB.generated.h"
UCLASS(BlueprintType, Blueprintable)
class BLANK_API UClassB : public UObject
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintAssignable, Category = "Listeners")
UClassA::FSomeDelegate OnDelegate;
};
Actual Result: The compiler fails with the following error:
Error: Unable to find 'class', 'delegate', 'enum', or 'struct' with name 'UClassA::FSomeDelegate'
Expected Result:The code should compile.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-172921 in the post.
| 2 |
| Component | UE - Foundation - Cpp Tools - UnrealHeaderTool |
|---|---|
| Affects Versions | 5.1 |
| Target Fix | 5.1.1 |
| Created | Dec 14, 2022 |
|---|---|
| Resolved | Jan 5, 2023 |
| Updated | Feb 4, 2023 |