Description

When packaging with nativization if you have a widget as a value in a TMap, the package will not finish building. The TMap will throw an error during the Package process that reads:

UnrealBuildTool: D:/Answerhub_repro_proj/DetatchComp/Intermediate/Plugins/WindowsNoEditor/NativizedAssets/Source/NativizedAssets/Public/Widget1__pf1010915279.h(19) : Error: Unrecognized type 'UWidget2_C' - type must be a UCLASS, USTRUCT or UENUM

I believe that this is a bug as Subwidget is a child of UserWidget, which is a UClass.

Steps to Reproduce
  1. Create a new project (no template or starter content needed)
  2. Create a new widget > Name it "SubWidget" > Open SubWidget
  3. Add a button to the canvas panel and set the anchor to full screen and set all offsets to 0
  4. Compile, Save, and close SubWidget
  5. Create a new widget > Name it "MainWidget" > Open MainWidget
  6. Add an image to the canvas panel > check the is variable option for the canvas panel
  7. In MainWidget's event graph Copy the Blueprint from Win7_MainBP_1
  8. Compile, Save, and Close MainWidget
  9. In the level blueprint create MainWidget and add it to the viewport
  10. Save the Level as "TEST"
  11. Open the project settings under Maps & Modes, set the startup and game default maps to TEST
  12. In Packaging under Blueprints, set the nativization method to inclusive
  13. Package the project for Windows 64 bit

Result: The Package does not build
Expected Result: The Package builds

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

12
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.15.34.16
CreatedJun 15, 2017
ResolvedJul 15, 2021
UpdatedJul 19, 2021