Nativize blueprints fails with C++ interface

I just tried to package my project with nativize blueprint turned on and it reports an error when trying to compile an actor blueprint that inherits from a class that implements an interface declared in C++, giving the following error

[2016.07.27-15.43.40:047][218]MainFrameActions: Packaging (Windows (32-bit)): UnrealBuildTool: C:\Users\ExatoComp\Documents\Unreal Projects\InterfaceTest\Intermediate\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Private\InheritedBlueprint__pf3688439234.cpp(239): error C2039: 'bpf__Function__pf_Implementation': is not a member of 'ABlueprintActor_C__pf3688439234'

[2016.07.27-15.43.40:047][218]MainFrameActions: Packaging (Windows (32-bit)): UnrealBuildTool: c:\users\exatocomp\documents\unreal projects\interfacetest\intermediate\windowsnoeditor\nativizedassets\source\nativizedassets\public\BlueprintActor__pf3688439234.h(7): note: see declaration of 'ABlueprintActor_C__pf3688439234'

[2016.07.27-15.43.40:047][218]MainFrameActions: Packaging (Windows (32-bit)): UnrealBuildTool: C:\Users\ExatoComp\Documents\Unreal Projects\InterfaceTest\Intermediate\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Private\InheritedBlueprint__pf3688439234.cpp(239): error C3861: 'bpf__Function__pf_Implementation': identifier not found

I repro’d this in a new project with the following steps:

  1. Create a blank C++ project

  2. Create an interface in C++ with a function with a signature of

UFUNCTION(BlueprintNativeEvent) void Function();

  1. Create an Actor in C++ that implements the interface in step 2, implement the interface function

  2. Create a blueprint that inherits from the actor in step 3, implement the interface function

  3. Create another blueprint that inherits from the bp in step 4, implement the interface function and make sure to call the parent

  4. Turn on “Nativize Blueprint Assets” in the project settings

  5. Package the project

It doesn’t matter what is in the implementations as long as you add a call to the parent in there somewhere, my implementations for the blueprints were:

100367-inherited.png

I’m also attaching my [sample project][3]

Hello ,

We currently have a bug report in for an issue where Nativize Blueprint Assets will cause packaging to fail whenever any third party plugins are enabled. You can see more information about it here. This could be the issue you’re running into as I noticed that you have two plugins installed by looking at the contents of your .uproject file. Could you try disabling or uninstalling these plugins temporarily to see if the packaging process will then complete successfully?

Disabled the plugins and it failed to package with the same errors. I also removed the call to parent function from the inherited blueprint (the one from step 5) and it packaged correctly, even with the plugins enabled.

Thank you for testing that. I’ll be taking a look as your reproduction case and seeing what I can find out and put a bug report in if it seems necessary.

Good news, while testing this in our latest builds (4.13 and Master), I haven’t been able to reproduce the failed packaging with the same setup. I checked it in 4.12 to make sure I was reproducing it correctly and did see the issue there. This means that this should be fixed in 4.13’s previews or, at the latest, the full release. In the meantime I would suggest disabling Nativize Blueprint Assets as it is an experimental feature.

Actually it’s failing for me in 4.15.0. The first caught error is on my Blueprint Interface.
There’s more than this but I think this should be enough to illustrate the issue

UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\\Documents\Unreal Projects\VrTalk\Intermediate\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Public\Interactable__pf2106285105.h(7): error C2664: 'FUnconvertedWrapper<IInterface>::FUnconvertedWrapper(FUnconvertedWrapper<IInterface> &&)': cannot convert argument 1 from 'const 
IInterface *' to 'const UObject *'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\\Documents\Unreal Projects\VrTalk\Intermediate\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Public\Interactable__pf2106285105.h(7): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\\Documents\Unreal Projects\VrTalk\Intermediate\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Public\Interactable__pf2106285105.h(11): error C2039: 'FindFunctionChecked': is not a member of 'IInterface'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Program Files\Epic Games\UE_4.15\Engine\Intermediate\Build\Win64\UE4\Inc\Engine\KismetSystemLibrary.generated.h(25): note: see declaration of 'IInterface'
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\\Documents\Unreal Projects\VrTalk\Intermediate\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Public\Interactable__pf2106285105.h(17): error C2039: 'ProcessEvent': is not a member of 'IInterface'

Hello ,

Is this when using the same setup detailed in the original post or when trying to package your particular blueprint interface? If it’s yours, how does it differ? Have you tried recreating it in a fresh project to see if it still occurs? What type of nativization are you using, inclusive or exclusive?