Description

Packaging failure occurs with nativize blueprints enabled when you have an array of classes and you try to set it with an array from an instance of a native C++ class.

Found in 4.15.1. Reproduced in 4.14.3 and 4.16 Main CL# 3354254

Steps to Reproduce
  1. Open the editor
  2. Add a new C++ class based on Actor
  3. In <ProjectName>GameModeBase.h, add the following code:
    public:		
    
    	UPROPERTY(BlueprintReadOnly, Category = "Test")
    	TArray<TSubclassOf<AMyActor>> ActorClasses;
    
  4. Compile
  5. Back in the editor, create a new blueprint actor class and add an array of MyActor classes (ensure that they are not references, but classes)
  6. On BeginPlay, Get Game Mode and cast it to <ProjectName>GameModeBase
  7. Pull off the return value of the cast node and get ActorClasses
  8. Pull off of the getter and add a Set node for your array of MyActor classes
  9. Compile & Save
  10. Navigate to Project Settings->Packaging and set Blueprint Nativization Method to Inclusive
  11. Package for Win64

Result: Packaging fails with the following error:

Unreal Projects\MyProject2\Intermediate\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Private\TestActor__pf3688439234.cpp(284): error C2679: binary '=': no operator found which takes a right-hand operand of type 'TArray<TSubclassOf<AMyActor>,FDefaultAllocator>' (or there is no acceptable conversion)

Expected: No error would occur

Have Comments or More Details?

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

2
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint Runtime
Affects Versions4.144.154.16
Target Fix4.16
Fix Commit3381586
Main Commit3431398
Release Commit3397932
CreatedMar 23, 2017
ResolvedApr 5, 2017
UpdatedMay 12, 2017