Hello, I’ve been trying to package my game with the Nativize Blueprint Assets flag on but it doesn’t work. After poking around a bit, I found that the generated C++ files showed errors in mostly Blueprint Function Libraries and it always turned out to be functions marked as Const, with errors like:
...\MyProject\Intermediate\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Private\TestFuncs__pf3688439234.cpp(36): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
...\MyProject\Intermediate\WindowsNoEditor\NativizedAssets\Source\NativizedAssets\Private\TestFuncs__pf3688439234.cpp(36): error C2227: left of '->bpf__TestFunction__pf_Inner_0' must point to class/struct/union/generic type
The function tested resides in a Blueprint Function Library and looks like this:
In summary, to reproduce this:
- Create a new blank blueprint project.
- Create a new Blueprint Function Library.
- Create a new function in it and mark it as const.
- Set Nativize Blueprint Assets on.
- Package game (Windows (64-bit)).
Expected: game is sucessfully packaged.
Result: packaging fails due to errors in the generated C++ files. Note that Blueprint Actor Const functions compile correctly.
Thanks in advance.