Making a "Basic Code" C++ project and creating a class that has "TSubclassOf<UOtherClass> otherClass;" in it's header causes HTML5 packaging to fail.
A.h
B.h
Packaging works fine for Win32, regular Visual Studio compilation works.
HTML5 packaging error:
Any ideas on how to fix this?
A.h
Code:
#pragma once #include "CoreMinimal.h" #include "UObject/NoExportTypes.h" #include "B.h" #include "A.generated.h" /** * */ UCLASS() class TSUBCLASSTEST_API UA : public UObject { GENERATED_BODY() TSubclassOf<UB> Bclass; };
Code:
#pragma once #include "CoreMinimal.h" #include "UObject/NoExportTypes.h" #include "B.generated.h" /** * */ UCLASS() class TSUBCLASSTEST_API UB : public UObject { GENERATED_BODY() };
HTML5 packaging error:
Code:
UATHelper: Packaging (HTML5): UnrealBuildTool: [2/3] python.exe A.cpp UATHelper: Packaging (HTML5): UnrealBuildTool: In file included from C:/Users/<User>/Projects/TSubclassTest/Source/TSubclassTest/A.cpp:3: UATHelper: Packaging (HTML5): UnrealBuildTool: C:\Users\<User>\Projects\TSubclassTest\Source\TSubclassTest\A.h(18,25): error: implicit instantiation of undefined template 'TSubclassOf<UB>' UATHelper: Packaging (HTML5): UnrealBuildTool: ../../../../../Users/<User>/Projects/TSubclassTest/Source/TSubclassTest/A.h:18:25: error: implicit instantiation of undefined template 'TSubclassOf<UB>' UATHelper: Packaging (HTML5): UnrealBuildTool: TSubclassOf<class UB> Bclass; UATHelper: Packaging (HTML5): UnrealBuildTool: ^ UATHelper: Packaging (HTML5): UnrealBuildTool: Runtime/CoreUObject/Public/Templates/Casts.h:21:30: note: template is declared here UATHelper: Packaging (HTML5): UnrealBuildTool: template<class TClass> class TSubclassOf; UATHelper: Packaging (HTML5): UnrealBuildTool: ^
Comment