Language:
Page Info
Tags:
Skill Level:
Engine Version:
Related Pages

Advanced Blueprint Nativization

Choose your OS:
Prerequisite Topics

This page assumes you have prior knowledge of the following topics. Please read them before proceeding.

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.

Tags