Advanced Blueprint Nativization

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] in DefaultEditor.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 BlueprintPure or BlueprintCallable

  • noexport Structures and Classes

  • Bitfield Variables with BlueprintVisible or Editable Tags

  • Private Bitfield Variables

  • UBlueprintGeneratedClass, UUserDefinedStruct, and UUserDefinedEnum Variables (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 BlueprintCompilerCppBackend module (found in Engine\Source\Developer\BlueprintCompilerCppBackend\) converts the Blueprint syntax tree into C++.

  • The BlueprintNativeCodeGen module (found in Engine\Source\Developer\BlueprintNativeCodeGen\) does a lot of "magic" while cooking and packaging.

Debugging Converted Code on Windows

If you are working with a project that already includes some C++ code, you can use the existing project solution to debug the code. However, if your project originally contained only Blueprints, you'll need to run the GenerateProjectFiles batch file so that your project will have a Visual Studio solution.

Do not use this solution (or a new project under the main UE4 solution) to compile your project or to build an Editor version of your project.


The following steps assume that you've already cooked, built, and staged your project.

  1. Navigate to the NativizedAssets plugin folder, which should be located in your game's Intermediate folder (for example, [GameDirectory]\Intermediate\WindowsNoEditor\NativizedAssets).

  2. Move the NativizedAssets plugin folder into your game's Plugins folder (for example, [GameDirectory]\Plugins).

    Click for full image.

  3. Now, compile UE4 into a Development (or Development-Client, Development-Server) executable configuration, passing -basedir="[Path to Cooked Game]\Binaries\Win64" as a command line parameter.

    Passing -basedir="" as a command line parameter points UE4 to your game's cooked build.

At this point, you should be able to debug and modify the Nativized code at your discretion.