World Partition introduces a builder commandlet framework through the UWorldPartitionBuilderCommandlet function and the UWorldPartitionBuilder base class. A builder is a class that performs one batch process on a World Partition level, such as generating Hierarchical Levels of Detail (HLODs), rebuilding navigation data, baking the editor minimap, or resaving a large number of actors. The commandlet loads the level, runs the selected builder, and saves or submits the result.
You can use these commandlets to automate batch processes and to generate or modify data in World Partition levels at scale, typically from a build farm or script. Depending on the builder, the commandlet loads the world one region at a time, so you do not have to load large worlds all at once.
Using the Builder Commandlet
Unreal Engine ships with 15 builders and all the builders run using the same commandlet with the following format:
UnrealEditor.exe <Project> <Target> -run=WorldPartitionBuilderCommandlet -Builder=<BuilderClassName> [-AllowCommandletRendering] [-SCCProvider=<Provider>] [-AutoSubmit] [builder arguments]Project is the path to your .uproject file, or the project name when the project is next to the engine.
Target selects the levels to process. It can be one of the following:
A single map name or package path, such as
OpenWorldTestor/Game/ThirdPersonBP/Maps/OpenWorldTest.A comma-separated list of maps, such as
MapA,MapB.A content directory, such as
/Game/Maps. The commandlet processes every map package under it.A Collection path. The commandlet processes every map in the Collection and its child Collections.
*for every map in the project, or*,Nto skip the first N maps of the alphabetically sorted list and resume an interrupted run.
The commandlet processes each map one after the other. If a map fails, the commandlet logs a warning and continues with the remaining maps, then exits with a non-zero exit code.
The following arguments apply to every builder. Arguments that are specific to a builder are listed below in that builder's section.
| Argument | Description |
|---|---|
| Required. The class name of the builder to run, such as |
| Initializes the rendering subsystem. Required by builders that render, such as the HLODs (when building geometry), MiniMap, Landscape, Static Lighting, Virtual Heightfield Mesh, and Runtime Virtual Texture (RVT) builders. The run fails if this argument is missing. |
| Specifies which revision control provider to use, such as |
| Submits the files modified by the builder to revision control in a single changelist at the end of a successful run. Requires an enabled revision control provider. Without one, the commandlet logs an error and exits. The commandlet submits only the files that the builder reports as modified. |
| Text appended to the description of the changelist created by |
| Writes verbose output to the log. |
| Writes the log to a specific file, such as |
| Runs without initializing the editor user interface or showing dialogs. This is a standard engine argument. |
The commandlet also saves the builder settings per map in an .ini file next to the map package. It loads the file before the builder runs and writes it back when the run succeeds.
Running the Builder Commandlet
You can run the commandlet from the command line or from inside the editor.
From the Command Line
To run a builder from the command line, follow these steps:
Open a command prompt.
Navigate to the
Binaries\Win64folder of your engine installation, for exampleC:\Program Files\Epic Games\UE_5.9\Engine\Binaries\Win64.Run
UnrealEditor.exewith your project, the target level,-run=WorldPartitionBuilderCommandlet, and the builder to use.
For example, the following command generates the HLODs of the OpenWorldTest level:
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -AllowCommandletRendering -Builder=WorldPartitionHLODsBuilderAdd -SCCProvider=None to run without revision control, or -SCCProvider=Perforce -AutoSubmit to submit the modified files when the run succeeds. The commandlet writes its progress to the log. Add -log=<FileName> to write the log to a specific file.
From the Editor
You can start the following builders from the editor without a command prompt:
Build > World Partition > Build HLODs, Build HLODs (Selected Actors), and Build World Partition Editor Minimap launch the commandlet as a separate hidden process with the
-Unattendedand-RunningFromUnrealEdarguments and write its log to a file in your project'sSavedfolder. If the build fails, the Output Log points to that file.Build > Build Landscape, Build Landscape Spline Meshes, and Build Streaming Runtime Virtual Textures run the Landscape, Landscape Spline Meshes, and RVT builders.
Build > Gameplay > Build Smart Object Collections runs the Smart Object Collection builder when the Smart Objects plugin is enabled.
The console variable
ai.nav.bNavmeshAllowPartitionedBuildingFromEditorturns on building partitioned navigation data from the editor.
Available Builders
Unreal Engine ships with the following builders. The table below notes how each builder loads the world (region by region, the entire world at once, or in a way specific to the builder) and whether it needs the -AllowCommandletRendering argument.
| Builder | Description |
|---|---|
| Generates HLOD Actors. |
| Generates the World Partition Editor minimap. |
| Rebuilds the navigation mesh. |
| Builds landscape data (grass maps, physical materials, Nanite data, dirty height and weight maps). |
| Rebuilds and repartitions landscape spline meshes. |
| Changes the Instanced Foliage Grid Size in a level. |
| Builds static lighting for a World Partition level. Also works on non-World Partition levels. |
| Rebuilds the streaming textures of runtime virtual textures. Loads: Custom. |
| Resaves actors. Also works on non-World Partition levels that use One File Per Actor. |
| Renames or duplicates a level. |
| Rebuilds the Smart Object collection. Uses the Smart Objects plugin. |
| Generates PCG components. Uses the Procedural Content Generation (PCG) plugin. |
| Mesh Partition plugin. Builds Mesh Partition data. |
| Virtual Heightfield Mesh plugin. |
| Converts Content Bundles to External Data Layers. Uses the Game Features plugin. |
World Partition HLODs Builder
The World Partition HLODs Builder generates HLODs. It creates the HLOD actors for your World Partition cells according to the generation settings you specified in your HLOD Layers, then builds their geometry. With no step argument, the builder sets up the HLOD actors and then builds them. -AllowCommandletRendering is required whenever the builder builds HLOD geometry.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -AllowCommandletRendering -Builder=WorldPartitionHLODsBuilderThis builder takes the following arguments:
| Optional Argument | Description |
|---|---|
| Sets up the HLOD actors for the World Partition cells but does not build their geometry. Can update, delete, or create HLOD actors. Does not need |
| Builds the geometry of the existing HLOD actors that the HLOD rebuild policy considers out of date. |
| Builds the geometry of all existing HLOD Actors, ignoring the rebuild policy. |
| Deletes all HLOD actors from the level. |
| Builds only the HLOD actors generated by the named HLOD Layer, such as |
| Builds the single HLOD actor with the given label. Always rebuilds it. |
| Reports what the builder would do without saving any changes. |
| Prints statistics about all the HLOD actors in the level. |
| Runs the build step across several machines. To run a distributed build, follow these steps: |
| Reuses the HLODs already built in a parent branch instead of rebuilding them. |
-AllowCommandletRendering is required only when the Build step runs, so -SetupHLODs, -DeleteHLODs, -FinalizeHLODs, and -DumpStats can run without it. A distributed build also writes an HLODWorkingDirFileManifest.txt file in each HLODBuilder<N> working folder that lists the files that belong to that build. The console variable r.HLOD.Build.TolerateDanglingChildren (enabled by default) makes the distributed build step ignore references to child HLODs that no longer exist in the World Partition and rebuild the parent HLOD without them, instead of failing validation.
For more information about using HLODs in World Partition, see the World Partition - Hierarchical Level of Detail documentation.
World Partition MiniMap Builder
The World Partition MiniMap Builder generates or updates the minimap that appears in the World Partition Editor window. The builder captures the minimap from the WorldPartitionMiniMap actor. The options you select in the actor's Details panel controls the result. The minimap is stored as a virtual texture. If the texture is too big for the project, Map Check reports that the minimap cannot be rendered and asks you to reduce its size or turn on Virtual Texture Support.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -AllowCommandletRendering -Builder=WorldPartitionMiniMapBuilderThis builder takes the following arguments:
| Optional Argument | Description |
|---|---|
| Writes the captured tiles as bitmaps to your project's |
World Partition Navigation Data Builder
The World Partition Navigation Data Builder rebuilds the navigation mesh in your World Partition level. It requires a navigation mesh that is set up for World Partition and rebuilds the navigation data chunk actors in the level, loading the world in 2D regions. The builder takes the size of the regions it loads from the Navigation Data Builder Loading Cell Size setting in World Settings, and loads the Data Layers listed in Base Navmesh Data Layers during the build.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -Builder=WorldPartitionNavigationDataBuilder -SCCProvider=NoneThis builder takes the following arguments:
| Optional Argument | Description |
|---|---|
| Deletes all navigation data packages instead of building them. |
World Partition Landscape Builder
The World Partition Landscape Builder builds all data related to the landscape of a level:
Grass maps
Physical materials
Nanite data
Dirty height and weight maps
It loads the entire world and needs rendering for the Nanite build. The builder is also available using the Build Landscape option on the Build menu.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -SCCProvider=Perforce -Builder=WorldPartitionLandscapeBuilder -AllowCommandletRenderingThis builder takes the following arguments:
| Optional Argument | Description |
|---|---|
| Overrides the size of the builder’s cells in cm. For example, |
World Partition Landscape Spline Meshes Builder
The World Partition Landscape Spline Meshes Builder rebuilds the landscape spline meshes of a level and repartitions the actors that hold them into a new grid size. The same build is available from the Build Landscape Spline Meshes option in the Build menu.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -SCCProvider=Perforce -Builder=WorldPartitionLandscapeSplineMeshesBuilder -NewGridSize=51200This builder takes the following arguments:
| Optional Argument | Description |
|---|---|
| Sets a new grid size for the landscape spline mesh actors, in cm. |
World Partition Foliage Builder
In a World Partition map, the default Instanced Foliage Grid Size for Foliage Instances is 256 meters (25,600 cm, set in Editor Preferences > World Partition). The World Partition Foliage Builder changes the Instanced Foliage Grid Size of an existing World Partition level. It repartitions the Instanced Foliage Actors one source actor at a time, and does nothing if the level already uses the requested grid size.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -Builder=WorldPartitionFoliageBuilder -NewGridSize=51200This builder takes the following arguments:
| Argument | Description |
|---|---|
| Sets a new Instanced Foliage Grid Size in cm. Required and cannot be combined with |
| Renames the Instanced Foliage Actors of the level to their canonical names and merges duplicates. Cannot be combined with |
For more information on using Foliage Mode with World Partition, see the Foliage Mode documentation.
World Partition Static Lighting Builder
The World Partition Static Lighting Builder builds static lighting for a World Partition level, loading the entire world, and can save or submit the resulting built data.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -AllowCommandletRendering -Builder=WorldPartitionStaticLightingBuilder -Build -SinglePassThis builder takes the following arguments:
| Optional Argument | Description |
|---|---|
| Builds the static lighting and finalizes the result. |
| Finalizes a previous build without building again. |
| Deletes the built lighting data of the level. |
| Submits the built data to revision control. |
| Builds only the Volumetric Lightmap (VLM). |
| Builds the whole level in one pass instead of iteratively. |
| Saves every package the build dirtied, not only the lighting data. |
| Sets the lighting quality level to build, such as |
| Sets the directory used for the lightmap mapping data. |
World Partition RVT Builder
The World Partition RVT Builder finds all of the runtime virtual texture components in your level, and for any that have an associated Streaming Texture asset, it rebuilds the asset. Those assets are baked low-resolution versions of the runtime virtual textures, used to render in the distance to improve performance. The builder also works on levels that do not use World Partition. The same build is available from the Build Streaming Runtime Virtual Textures option on the Build menu.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -Builder=WorldPartitionRuntimeVirtualTextureBuilder -AllowCommandletRenderingFor more information on using streaming runtime virtual textures, see Runtime Virtual Texturing.
World Partition Resave Actors Builder
The World Partition Resave Actors Builder resaves all the actors in a World Partition level, or of any level that uses One File Per Actor. It also supports filters to resave only a subset of actors. For example, when you run the example below the builder resaves all of the actor packages in the OpenWorldTest level.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -SCCProvider=None -Builder=WorldPartitionResaveActorsBuilderYou can use the -ActorClassName argument to resave only a subset of actors. For example, adding -ActorClassName=StaticMeshActor resaves only the static meshes in the level. The value can be a native class name, a Blueprint class path, or a Blueprint class in the form Package.Name_C.
This builder takes the following arguments:
| Optional Argument | Description |
|---|---|
| Resaves only actors of the given class and its subclasses. |
| Resaves only actors whose classes are listed in the given text file. |
| Resaves only actors that have one of the given tags, such as |
| Resaves only actors whose properties have the given values, such as |
| Reports the actors that would be resaved without saving anything. |
| Resaves only the actors whose actor descriptors are out of date. |
| Logs the differences between the saved and the current actor descriptors. |
| Converts the external actor packages of the Level to the reduced packaging scheme. Cannot be combined with the class filter. |
| Toggles on Actor Folder Objects for the level. Cannot be combined with |
| Resaves the Blueprint assets referenced by the actors. |
World Partition Rename Duplicate Builder
The World Partition Rename Duplicate Builder automates the process of renaming or duplicating an existing World Partition level and the actors of its main container. The builder does not duplicate actors that come from other containers, such as Level Instances, and logs a warning for them. The example below creates a duplicate of the OpenWorldTest Level named NewPackage and leaves the original level untouched.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -SCCProvider=None -Builder=WorldPartitionRenameDuplicateBuilder -NewPackage=/Game/ThirdPersonBP/Maps/NewPackageThis builder takes the following arguments:
| Argument | Description |
|---|---|
| Required. The package path of the renamed or duplicated level. |
| Renames the level instead of duplicating it. The builder deletes the source map, its external actor packages, and its built data package, and leaves a redirector at the old path so existing references still resolve. |
World Partition Smart Object Collection Builder
The World Partition Smart Object Collection Builder rebuilds the smart object collection from all the smart object components in your World Partition level. It loads the level in 3D regions of 512 meters. You can start the same builder from the editor with Build > Gameplay > Build Smart Object Collections. When you run the example below, the builder rebuilds the Smart Object collection of the OpenWorldTest level.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -Builder=WorldPartitionSmartObjectCollectionBuilderWorld Partition PCG Builder
The World Partition PCG Builder loads the level completely, waits for asynchronous processes such as static mesh builds to complete, and then schedules generation on matching PCG components. When all generations are complete, it saves the World Partition level and exits.
You can start the same generation from the editor console with pcg.BuildComponents -IncludeGraphNames=PCG_GraphA;PCG_GraphB.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -Unattended -AllowCommandletRendering -run=WorldPartitionBuilderCommandlet -Builder=PCGWorldPartitionBuilder -IncludeGraphNames=PCG_GraphA;PCG_GraphBThis builder takes the following arguments:
| Optional Argument | Description |
|---|---|
| Includes a list of graph names in the generation, separated by semi-colons. If provided, the system schedules generation of all PCG components with the first graph assigned, then the same for the second graph, and so on. If omitted, PCG components are not filtered by graph. |
| Generates components that are saved with the Editing Mode Load As Preview. |
| Generates components with Editing Mode set to Normal. By default, the builder generates only components that are saved with the Editing Mode Load As Preview. |
| Generates components with Editing Mode set to Preview. By default, the builder generates only components that are saved with the Editing Mode Load As Preview. |
| Submits the result to revision control regardless of errors. The errors are still reported and the job status is still Failed. By default, any error that occurs while a component is generating fails the build job and the builder does not submit the results. |
| When modified files cannot be checked out, the builder continues instead of failing the whole build. The result can be a partial generation. The matching PCGBuilderSettings property is Ignore Source Control Errors. |
| Includes a list of unique actor IDs separated by semi-colons. If provided, the builder generates only PCG components on matching actors. Use this argument to debug a single component or actor. |
| Schedules generation of one component at a time and waits for each generation to finish before scheduling the next. Use this argument while debugging to ensure asynchronous processes do not interfere with each other. |
| Specifies a PCGBuilderSettings asset to use when setting up the builder. All command-line arguments override the values set in the asset. |
| Processes the world one cell at a time instead of loading everything at once. Loaded components generate and save, then the builder unloads them before moving to the next cell. Use this argument for large worlds where loading the whole world causes memory issues. |
| Overrides the default cell size when using |
| Attempts to submit the result to revision control, if available. |
| Builds the full asset registry for all assets in the project. Required if the builder needs to access assets not referenced in the level. |
World Partition Mesh Partition Builder
The World Partition Mesh Partition Builder builds the compiled Mesh Partition data of a level. This builder requires rendering. The -ReuseMode argument controls how much of the previous build the builder reuses.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -AllowCommandletRendering -Builder=WorldPartitionMeshPartitionBuilder -ReuseMode=ByPackageHash -SCCProvider=NoneThis builder takes the following arguments:
| Optional Argument | Description |
|---|---|
| Sets how the builder reuses existing compiled sections. Use one of the following values: |
World Partition Virtual Heightfield Mesh Builder
The World Partition Virtual Heightfield Mesh Builder builds the Virtual Heightfield Mesh data in a level. It loads the entire world and requires rendering.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -AllowCommandletRendering -Builder=WorldPartitionVirtualHeightfieldMeshBuilderGame Feature Action Convert Content Bundle World Partition Builder
The Game Feature Action Convert Content Bundle World Partition Builder converts the Content Bundles in a level into External Data Layers. The level must contain Content Bundles and have an External Data Layer manager.
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -Builder=GameFeatureActionConvertContentBundleWorldPartitionBuilder -DestinationFolder=/Game/ExternalDataLayersThis builder takes the following arguments:
| Optional Argument | Description |
|---|---|
| Sets the content folder where the builder creates the External Data Layer assets. |
| Sets a list of the Content Bundles to convert. If omitted, the builder converts every Content Bundle in the level. |