Description

Packaging will fail if a Blueprint is set to be nativized, and it includes a TArray inherited from a parent code class that is of type TSubclassOf< SomeClass >.

REGRESSION:
Unknown. Blueprint nativization was still experimental in 4.14. This may be similar to [Link Removed].

Steps to Reproduce
  1. Create a new Basic Code project.
  2. Add two new code classes to the project that are derived from Actor. Name one "MyActor" and the other "MyOtherActor".
  3. In the MyActor.h file, add the following property:
    UPROPERTY(BlueprintReadWrite, EditAnywhere)
    TArray<TSubclassOf<class AMyOtherActor>> TheOtherClass;
    
  4. In the Editor, create a new Blueprint for each of the new Actor classes.
  5. In the Blueprint derived from MyActor, drag off of the Begin Play node and set the first element of TheOtherClass to the Blueprint that is derived from MyOtherActor.
  6. Open the Packaging settings.
  7. Set the Blueprint Nativization Method to Exclusive.
  8. Click the Show Advanced arrow.
  9. Add an element to the List of Blueprint assets to nativize array.
  10. Set the new element to the Blueprint that was derived from MyActor.
  11. Package the project for Win64.

RESULT:
The package fails with a message stating "error C2679: binary '=': no operator found which takes a right-hand operand of type 'TArray<UClass *,FDefaultAllocator>' (or there is no acceptable conversion)"

EXPECTED:
The package completes successfully.

Have Comments or More Details?

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

4
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.154.16
Target Fix4.16
Fix Commit3381586
Main Commit3431398
Release Commit3397932
CreatedMar 8, 2017
ResolvedApr 5, 2017
UpdatedMay 12, 2017
View Jira Issue