For unknown reason, the header of BP_Parent is included twice. The second header is located after the .generated.h, causing the compile error.
The following is the include section of BP_Child__pf1010915279.h, which was automatically generated when nativizing:
#pragma once #include "GeneratedCodeHelpers.h" #include "Blueprint/BlueprintSupport.h" #include "BP_Parent__pf1010915279.h" #include "BP_Child__pf1010915279.generated.h" #include "BP_Parent__pf1010915279.h"
UATHelper: Packaging (Windows (64 bit)): E:/TestNative/Intermediate/Plugins/NativizedAssets/Windows/Game/Source/NativizedAssets/Public/BP_Child__pf1010915279.h(6): Error: #include found after .generated.h file - the .generated.h file should always be the last #include in a header
UATHelper: Packaging (Windows (64 bit)): Error: UnrealHeaderTool failed for target 'TestNative' (platform: Win64, module info: E:\TestNative\Intermediate\Build\Win64\TestNative\Development\TestNative.uhtmanifest, exit code: OtherCompilationError (5)).
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-60961 in the post.