Building with Unreal Automation Tool
To nativize Blueprints while building with Unreal Automation Tool from the commandline, add the -nativizeAssets switch to your BuildCookRun command.
Header Declaration
Nativized Blueprints are stored in a new, separate module, which means that headers from the gameplay module are now used outside of their original module. You should check that all of your headers have declared all of the classes, and all of the structs, being used; either as an included header or as a forward declaration.
Fixing Missing Headers
Many projects have an "aggregate" header: either [GameName]/[GameName].h, or [GameName]/Public/[GameName].h.
- If you add the path of this header to
FilesToIncludeInModuleHeader, under[BlueprintNativizationSettings]inDefaultEditor.ini, you can fix many issues related to missing headers.
Fostering Code Cooperation
There are some restrictions that help make cooperation between manually written code and nativized code, reliable and efficient. With this in mind, the following implementations aren't supported:
- Private and Protected Functions Marked as
BlueprintPureorBlueprintCallable noexportStructures and Classes- Bitfield Variables with
BlueprintVisibleorEditableTags - Private Bitfield Variables
UBlueprintGeneratedClass,UUserDefinedStruct, andUUserDefinedEnumVariables (or any type based on these variables)
Technical Details
If you encounter a compiler or linker error (such as LNK1000 or LNK1248), try reducing the amount of nativized Blueprints from your project,
by excluding Blueprint types, or specific Blueprints, in the DefaultEngine.ini configuration settings file. For more information about excluding Blueprints
from nativization, refer to our Nativizing Blueprints documentation.
If you want to learn how the Blueprint Nativization process works "under-the-hood", read through the following modules:
- The
BlueprintCompilerCppBackendmodule (found inEngine\Source\Developer\BlueprintCompilerCppBackend\) converts the Blueprint syntax tree into C++. - The
BlueprintNativeCodeGenmodule (found inEngine\Source\Developer\BlueprintNativeCodeGen\) does a lot of "magic" while cooking and packaging.