Packaging fails when using sprites in UMG with nativization turned on

If you use sprites in a UMG widget in the 4.15 preview and try to package with blueprint nativization on it fails with the error Cannot open include file: 'PaperSprite.h': No such file or directory

Repro steps for this are:

  1. Create a UMG widget.
  2. Add an image to the widget, set the brush for it to a sprite in your project (or just create a new one).
  3. Change the “Blueprint Nativization Method” under Project Settings->Packaging to “Inclusive”.
  4. Package the project.

Attaching my repro case to this post as well

Hello kgamble,

I tested this in a clean project, however I was unable to reproduce this issue without using the assets provided. Could you provide more information on any changes that you may have made to the assets in your project that may have been left out of your original steps?

I can’t think of anything that was missing, but just in case I remade my project and took screenshots along the way.

  1. Create a new project, I chose blank blueprint project with no starter content

  1. Add a new UMG widget (no screenshot of this)
  2. In the widget, drag and drop an image into the canvas panel, change Brush->Image to Create New Asset->Sprite, save the new asset to the root of your content folder

  1. Your Content Browser should now look something like this

  1. Open your packaging settings and change Blueprint Nativization Method to Inclusive

  1. Package your project under Windows (32-bit). It also failed when I tried Windows (64-bit).

While I was doing this I did find that if I installed the project templates and picked 2D Side Scroller then it didn’t fail to package, so maybe something about the templates fixes this that the blank project doesn’t do.

After reading over your new information, I was able to reproduce this issue on our end in a clean project. I have written up a report and I have submitted it to the developers for further consideration. I have provided a link to the public tracker. Please feel free to use the link provided for future updates. Thank you for your time and information.

Link: Unreal Engine Issues and Bug Tracker (UE-41264)

Make it a great day

hi kgamble,
There is a workaround. Add “+AdditionalPublicDependencyModuleNames=Paper2D” in [BlueprintNativizationSettings] section in your DefaultEditor.ini. Let me know it it helps.

Looks like that fixed it, thanks.