Description

This happens because the Blueprinted component is not also enabled for nativization, but the nativized Actor BP tries to use it as a native class type.

Current workaround: Ensure that the Blueprinted component class is also enabled for nativization, or use "Inclusive" nativization mode.

Steps to Reproduce
  1. Launch UE4 editor with a new, blank C++ project.
  2. Create a new ActorComponent-based Blueprint class (MyComponentBP) and save it.
  3. Create a new Actor-based Blueprint class (MyActorBP) and open it in the BP editor.
  4. Add MyComponentBP component in the Components tree view.
  5. Click "Class Settings" and check the "Nativize" button.
  6. Compile and save, then close the BP editor.
  7. Drag an instance of MyActorBP into the current level.
  8. Save the current level (NewMap).
  9. Go to "Edit->Project Settings..." and Project/Maps & Modes, and under "Default Maps" change both to "NewMap."
  10. Switch to Project/Packaging and change "Blueprint Nativization Method" to "Exclusive."
  11. Close the Project Settings window, and go to "File->Package Project->Windows->Windows (64-bit)"
  12. Choose/create a folder for packaging and accept.
  13. Packaging will eventually fail with the following error:
  14. [2017.04.26-17.02.28:867][850]UATHelper: Packaging (Windows (64-bit)): xgConsole: MyActorBP__pf1010915279.cpp
    [2017.04.26-17.02.28:870][850]UATHelper: Packaging (Windows (64-bit)): xgConsole: D:\dev\local\Epic\Testing\NatTest\Intermediate\Plugins\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Private\MyActorBP__pf1010915279.cpp(225): error C2065: 'UMyComponentBP_C__pf1010915279': undeclared identifier
    [2017.04.26-17.02.28:871][850]UATHelper: Packaging (Windows (64-bit)): xgConsole: D:\dev\local\Epic\Testing\NatTest\Intermediate\Plugins\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Private\MyOtherActorBP__pf1010915279.cpp(225): error C2672: 'UObject::CreateDefaultSubobject': no matching overloaded function found
    [2017.04.26-17.02.28:873][850]UATHelper: Packaging (Windows (64-bit)): xgConsole: D:\dev\local\Epic\Testing\NatTest\Intermediate\Plugins\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Private\MyActorBP__pf1010915279.cpp(225): error C2974: 'UObject::CreateDefaultSubobject': invalid template argument for 'TReturnType', type expected
    [2017.04.26-17.02.28:874][850]UATHelper: Packaging (Windows (64-bit)): xgConsole: d:\dev\epic\ue4\dev-framework\engine\source\runtime\coreuobject\public\UObject/Object.h(95): note: see declaration of 'UObject::CreateDefaultSubobject'
    [2017.04.26-17.02.28:875][850]UATHelper: Packaging (Windows (64-bit)): xgConsole: 
    [2017.04.26-17.02.28:876][850]UATHelper: Packaging (Windows (64-bit)): xgConsole: Error executing D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe (tool returned code: 2)
    

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-44399 in the post.

7
Login to Vote

Won't Fix
CreatedApr 26, 2017
ResolvedAug 18, 2021
UpdatedAug 18, 2021