Description

This occurs because the MakeStruct node will create a literal term for each input if nothing is connected. However, there is no explicit handling of some native 'noexport' struct types (e.g. FVector4) in FEmitHelper::LiteralTerm(), which then falls back to FEmitDefaultValueHelper::SpecialStructureConstructor() with a default struct value, but that API also does not have a special case for some 'noexport' types. In that case, LiteralTerm() currently assumes that StaticStruct() is valid for all other cases, which fails for any 'noexport' type that falls through.

Steps to Reproduce
  1. Create a new (blank) BP-only project.
  2. Create a new user-defined struct (NewUserDefinedStruct).
  3. Change the member type to Vector4.
  4. Save and close the UDS editor.
  5. Create a new Actor-based Blueprint class (NewBlueprint).
  6. In the event graph, add a new 'Make New User Defined Struct' node.
  7. Drag off the output pin and add a 'Break New User Defined Struct' node.
  8. Drag off the 'Member Var 0' output and add a 'Break Vector4' node.
  9. Drag off the BeginPlay node and add a PrintString node.
  10. Connect the 'X' output pin on the 'Break Vector4' node to the 'In String' input on the PrintString node.
  11. Compile, save and close the Blueprint editor.
  12. Choose Edit->Project Settings... and change "Blueprint Nativization Method" to 'Inclusive'.
  13. Choose File->Package Project->Windows->Win64 and select a location, then wait for packaging to finish.
  14. Note that a C++ compile error will result during the build phase that follows the cook phase:
UATHelper: Packaging (Windows (64-bit)):   D:\dev\local\Projects\NatFunctionTest\Intermediate\Plugins\NativizedAssets\Windows\Game\Source\NativizedAssets\Private\NewBlueprint1__pf1010915279.cpp(424): error C2039: 'StaticStruct': is not a member of 'FVector4'
UATHelper: Packaging (Windows (64-bit)):   D:\dev\local\Projects\NatFunctionTest\Intermediate\Plugins\NativizedAssets\Windows\Game\Intermediate\Build\Win64\NatFunctionTest\Inc\NativizedAssets\NewBlueprint1__pf1010915279.generated.h(11): note: see declaration of 'FVector4'
UATHelper: Packaging (Windows (64-bit)):   D:\dev\local\Projects\NatFunctionTest\Intermediate\Plugins\NativizedAssets\Windows\Game\Source\NativizedAssets\Private\NewBlueprint1__pf1010915279.cpp(424): error C3861: 'StaticStruct': identifier not found

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.19
Target Fix4.21
Fix Commit4347635
Main Commit4736445
CreatedMay 24, 2018
ResolvedSep 6, 2018
UpdatedOct 3, 2019