UHT fail to handle multi-line comment with double slash in the last line, and it fail to parse class definition far below.
When a multi-line comment such as copyright notice, has a URL in the last line, it becomes hard to find issue.
I found similar question here.
Small code to reproduce this bug:
/*
* // */
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "BasicCodeGameModeBase.generated.h"
UCLASS()
class BASICCODE_API ABasicCodeGameModeBase : public AGameModeBase
{
GENERATED_BODY()
};
This code result in:
3> Running UnrealHeaderTool "D:\Users\yos\Documents\Unreal Projects\BasicCode\BasicCode.uproject" "D:\Users\yos\Documents\Unreal Projects\BasicCode\Intermediate\Build\Win64\BasicCodeEditor\Development\BasicCodeEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
3>D:/Users/yos/Documents/Unreal Projects/BasicCode/Source/BasicCode/BasicCodeGameModeBase.h(10) : LogWindows: Error: === Critical error: ===
3>D:/Users/yos/Documents/Unreal Projects/BasicCode/Source/BasicCode/BasicCodeGameModeBase.h(10) : LogWindows: Error:
3>D:/Users/yos/Documents/Unreal Projects/BasicCode/Source/BasicCode/BasicCodeGameModeBase.h(10) : LogWindows: Error: Assertion failed: FoundClass [File:D:\Build\++UE4\Sync\Engine\Source\Programs\UnrealHeaderTool\Private\HeaderParser.cpp] [Line: 5550]
3>D:/Users/yos/Documents/Unreal Projects/BasicCode/Source/BasicCode/BasicCodeGameModeBase.h(10) : LogWindows: Error:
3>D:/Users/yos/Documents/Unreal Projects/BasicCode/Source/BasicCode/BasicCodeGameModeBase.h(10) : LogWindows: Error:
3>D:/Users/yos/Documents/Unreal Projects/BasicCode/Source/BasicCode/BasicCodeGameModeBase.h(10) : LogWindows: Error:
3>D:/Users/yos/Documents/Unreal Projects/BasicCode/Source/BasicCode/BasicCodeGameModeBase.h(10) : LogWindows: Error: