Description

Blueprint assets that utilize an array "swap" node to swap elements cannot currently be converted to C++.

Current workaround: Either avoid use of the "swap" node or exclude the Blueprint asset from nativization.

Steps to Reproduce
  1. Create a new, blank Blueprint-only project.
  2. Create a new, Actor-based Blueprint class asset.
  3. Double-click the Blueprint to open it for editing.
  4. Add a new integer array variable.
  5. Compile, and add 2 elements to the array variable's default value.
  6. Drag the array variable into the event graph to create a "Get" node.
  7. Drag off the "Get" node's output pin and add a "Swap array elements" node.
  8. Connect the "Swap" node's exec pin to the "BeginPlay" event node.
  9. Compile and save the Blueprint, then close the Blueprint editor.
  10. Drag a new instance of the Blueprint into the current level.
  11. Save the level (NewMap).
  12. In Edit->Project Settings, Maps & Modes, set 'NewMap' as the game's default map.
  13. Also in Project Settings, Packaging, set "Blueprint Nativization Method" to "Inclusive."
  14. Choose File->Package Project->Windows (64-bit).
  15. Choose an output location and wait for packaging to finish.
  16. During packaging, an error will result while compiling the nativized EXE:
UATHelper: Packaging (Windows (64-bit)): Module.NativizedAssets.cpp (1:44.68 at +4:11)
UATHelper: Packaging (Windows (64-bit)): E:/dev/local/Projects/NatArrayTest/Intermediate/Plugins/NativizedAssets/Windows/Game/Source/NativizedAssets/Private/NewBlueprint__pf1010915279.cpp(527): error C2039: 'Array_Swap': is not a member of 'FCustomThunkTemplates'
UATHelper: Packaging (Windows (64-bit)): D:\dev\UE4\Dev-Framework\Engine\Source\Runtime\Engine\Public\GeneratedCodeHelpers.h(86): note: see declaration of 'FCustomThunkTemplates'
UATHelper: Packaging (Windows (64-bit)): E:/dev/local/Projects/NatArrayTest/Intermediate/Plugins/NativizedAssets/Windows/Game/Source/NativizedAssets/Private/NewBlueprint__pf1010915279.cpp(527): error C3861: 'Array_Swap': identifier not found
UATHelper: Packaging (Windows (64-bit)): 
UATHelper: Packaging (Windows (64-bit)): Error executing D:\dev\UE4\Dev-Framework\Engine\Build\Windows\cl-filter\cl-filter.exe (tool returned code: 2)
Callstack

N/A

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.244.25
Target Fix4.26
Fix Commit13886644
CreatedJul 17, 2020
ResolvedJul 17, 2020
UpdatedApr 28, 2021
View Jira Issue