We have been packaging through the editor.
After several attempts and a few changes we have managed to nativize a standalone Blueprint inside our project with all our C++ interfaces added to it.
Fix1: We had to replace the virtual implementation from using TSubclassOf to UClass* , interestingly we were able to leave the c++ declaration as TSubclassOf so we still get the benefit in Blueprint of filtering the class and no changes required to existing blueprint using the interface. See below.
BEFORE:
UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "Tech")
TSubclassOf<class UTech> GetTechClass(const UObject* FromObj = nullptr) const;
virtual TSubclassOf<class UTech> GetTechClass_Implementation(const UObject* FromObj = nullptr) const { return nullptr; }
AFTER:
UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "Tech")
TSubclassOf<class UTech> GetTechClass(const UObject* FromObj = nullptr) const;
virtual UClass* GetTechClass_Implementation(const UObject* FromObj = nullptr) const { return nullptr; }
Fix 2: The other case, had to do with the interface function requiring an array return paramater in blueprint but the blueprint compiler wasn’t enforcing it, letting you compile it but failed when nativized. Below is the interface function.
UFUNCTION(BlueprintImplementableEvent, Category = "Planet")
TArray<class AUnitPawn*> GetAssignedDefendersUpdate() const;
We can’t run a nativized executable to test further (crashes immediately) but that’s due to another issue we have identified in 4.16 (I’ll open a separate report since it has nothing to do with this one). Once we get past that I will test further and see if we still get the original error reported with our other blueprints marked for nativizing. Thanks again!