UE5 GuideSeptember 12, 202611 min read

UE5 World Partition: Setup and Best Practices

World Partition revolutionizes how Unreal Engine handles large worlds. This guide covers everything from initial setup to production optimization.

What is World Partition?

World Partition is UE5's answer to the challenge of building massive open worlds. Instead of manually dividing your world into streaming levels, World Partition automatically manages what's loaded based on player position and defined rules.

The system replaces the old World Composition workflow with a more automated, grid-based approach. Your entire world exists as a single persistent level, but only relevant portions are loaded at any time.

World Partition Basics

Understanding the core concepts is essential before diving into implementation.

The Grid System

World Partition divides your world into a grid of cells. Each cell contains the actors within its bounds. The grid cell size determines the granularity of streaming - smaller cells mean finer control but more streaming operations.

// Common grid cell sizes
Small open world: 12800 units (128m)
Medium open world: 25600 units (256m)
Large open world: 51200 units (512m)

// Grid settings location
World Settings -> World Partition -> Runtime Settings -> Grid

Choose your cell size based on your content density. Dense urban areas benefit from smaller cells, while sparse wilderness can use larger ones.

Streaming Sources

Streaming Sources determine what gets loaded. By default, the player's position is the primary source. As players move, cells within streaming distance are loaded and distant cells are unloaded.

// Setting up custom streaming sources in C++
UPROPERTY(EditAnywhere)
TObjectPtr<UWorldPartitionStreamingSourceComponent> StreamingSource;

// In BeginPlay or when needed
StreamingSource = CreateDefaultSubobject<UWorldPartitionStreamingSourceComponent>(
  TEXT("StreamingSource")
);
StreamingSource->SetStreamingSourceEnabled(true);

You can create additional streaming sources for AI, vehicles, or gameplay systems that need to load content ahead of player arrival.

Actor Partitioning

Every actor in a World Partition level belongs to a cell. When you place or move an actor, it's automatically assigned to the appropriate cell based on its position. You can see cell assignments in the World Partition window.

Enabling World Partition

For new projects, enable World Partition when creating your level. For existing levels, migration is more involved.

New Level Setup

1. File -> New Level -> Open World
2. This creates a level with World Partition enabled
3. Configure grid size in World Settings

// Or enable on empty level
World Settings -> World Partition -> Enable World Partition = true

Converting Existing Levels

Converting an existing level to World Partition requires careful planning. The process involves:

  1. Backup your project
  2. Enable World Partition in World Settings
  3. Run the conversion commandlet if needed
  4. Review and fix any actors that didn't convert properly
  5. Set up data layers for existing streaming volumes
// Conversion commandlet for large levels
UE5Editor.exe ProjectName -run=WorldPartitionConvertCommandlet MapPath

Data Layers and Streaming

Data Layers provide manual control over streaming beyond the automatic grid system. They're essential for gameplay-driven loading.

Understanding Data Layers

Data Layers group actors that should load and unload together regardless of their grid position. Examples include:

  • Interior building content that loads when entering
  • Quest-specific actors that appear during missions
  • Time-of-day variations (day/night versions)
  • Seasonal changes (summer/winter foliage)

Creating Data Layers

// Creating a Data Layer
1. Window -> World Partition -> Data Layers
2. Click "+" to create new Data Layer Asset
3. Configure:
   - Is Runtime: Enable for gameplay streaming
   - Initial State: Loaded/Unloaded/Activated
   - Data Layer Type: Runtime or Editor-only

// Assigning actors to Data Layer
Select actor -> Details -> Data Layers -> Add layer

Runtime Data Layer Control

You can control Data Layers from Blueprint or C++ during gameplay:

// C++ Data Layer control
UDataLayerSubsystem* DataLayerSubsystem = GetWorld()->GetSubsystem<UDataLayerSubsystem>();

// Activate a layer (loads and shows)
DataLayerSubsystem->SetDataLayerRuntimeState(
  InteriorDataLayer,
  EDataLayerRuntimeState::Activated
);

// Deactivate (hides but keeps loaded)
DataLayerSubsystem->SetDataLayerRuntimeState(
  InteriorDataLayer,
  EDataLayerRuntimeState::Loaded
);

// Unload completely
DataLayerSubsystem->SetDataLayerRuntimeState(
  InteriorDataLayer,
  EDataLayerRuntimeState::Unloaded
);

Data Layer Hierarchies

Data Layers can have parent-child relationships. When a parent layer is unloaded, all children unload too. This is useful for organizing complex streaming scenarios.

// Example hierarchy
CityBlock_A (parent)
  - Buildings_A (child)
  - Interiors_A (child)
  - Traffic_A (child)

// Unloading CityBlock_A unloads all children

Open World Optimization

World Partition alone doesn't guarantee good performance. Proper optimization is still essential.

HLOD (Hierarchical Level of Detail)

HLOD creates simplified versions of distant content. Instead of rendering hundreds of individual meshes, HLOD combines them into single low-poly representations.

// HLOD Setup
1. Enable HLOD in World Settings
2. Configure HLOD layers:
   - Layer 0: Full detail (0-500m)
   - Layer 1: Medium (500-2000m)
   - Layer 2: Low (2000m+)

3. Build HLOD:
   Build -> Build HLODs

// HLOD settings per layer
MinDrawDistance: Distance where this HLOD appears
ParentLayer: For multi-level HLOD
HLODSetup: Mesh merging rules

Configure HLOD layers based on your content. Dense areas need more aggressive simplification at shorter distances.

Loading Priority

Not all content is equally important. Set priorities to ensure critical actors load first:

// Priority levels
High: Gameplay-critical actors (AI, triggers)
Normal: Standard level content
Low: Decorative elements

// Set via actor properties
Details -> World Partition -> Priority
// Or programmatically
Actor->SetPriorityClass(EStreamingPriorityClass::High);

Streaming Distance Overrides

Some actors need custom streaming distances. A small decoration should unload sooner than a large landmark:

// Per-actor streaming distance
Details -> World Partition -> Override Streaming Distance = true
Details -> World Partition -> Streaming Distance = 5000

// Useful for:
- Large landmarks visible from far away
- Small details that should cull early
- Gameplay elements with specific range requirements

Cell Size Tuning

Your initial grid size may not be optimal everywhere. Use runtime profiling to identify problem areas:

// Console commands for debugging
wp.Runtime.Debug 1  // Show cell boundaries
wp.Runtime.ShowStreamingSource 1  // Visualize streaming sources
stat streaming  // Streaming statistics

// Common issues:
- Cells too large: Loading hitches
- Cells too small: Too many streaming operations
- Uneven content distribution: Variable performance

One File Per Actor (OFPA)

World Partition uses One File Per Actor to improve collaboration. Each actor is saved as a separate file, eliminating merge conflicts when multiple developers work on the same level.

OFPA Benefits

  • No level file locks - everyone can work simultaneously
  • Git-friendly - meaningful diffs per actor
  • Faster iteration - only changed actors recompile
  • Better version control - track changes per actor

Managing OFPA Files

// OFPA file location
Content/__ExternalActors__/LevelName/XX/YY/ActorGuid.uasset

// Best practices
- Use source control with file locking disabled for levels
- Set up .gitattributes for proper binary handling
- Regular cleanup of deleted actor files
- Use commandlets for bulk operations

// Cleanup commandlet
UE5Editor.exe ProjectName -run=ResavePackages -fixupredirects

Level Instances

Level Instances let you reuse content across your world. A building interior can be instanced multiple times, saving memory and authoring time.

// Creating Level Instance
1. Create a sub-level with reusable content
2. Drag level into World Partition level as Level Instance
3. Position and rotate as needed

// Level Instance advantages
- Shared memory for identical instances
- Single place to update content
- Works with World Partition streaming

Multiplayer Considerations

World Partition works with multiplayer but requires additional setup.

Server Streaming

The server must load content for all connected players, not just one position. Configure server streaming sources:

// Server streaming setup
Project Settings -> World Partition -> Enable Server Streaming = true

// Each player controller becomes a streaming source
// Server loads union of all player requirements

Replication Boundaries

Actors in unloaded cells can't replicate. Handle this in your game logic:

// Check if actor is loaded before referencing
if (IsValid(TargetActor) && TargetActor->HasActorRegisteredAllComponents())
{
  // Safe to interact
}
else
{
  // Actor not loaded - handle gracefully
}

Common Issues and Solutions

Loading Hitches

If you experience hitches when moving through the world:

  • Reduce cell size in problem areas
  • Enable async loading where possible
  • Use loading priority to spread load over frames
  • Profile with Unreal Insights to find expensive actors

Missing Actors

Actors disappearing unexpectedly usually indicates streaming issues:

// Debug missing actors
1. Check actor's grid cell assignment
2. Verify streaming distance settings
3. Check Data Layer state if applicable
4. Use wp.Runtime.Debug to visualize

// Force actor to always be loaded
Details -> World Partition -> Is Spatially Loaded = false

Editor Performance

Large World Partition levels can be slow in editor. Improve editing performance with:

  • Reduce editor streaming distance in World Settings
  • Use region-based loading (only load what you're editing)
  • Enable asynchronous actor loading in editor

Integration with UnrealPilot

Managing World Partition settings across hundreds of actors is tedious. UnrealPilot can help automate common tasks:

"Set all decoration meshes to low streaming priority"
"Create a Data Layer for the underground subway system"
"Find all actors not assigned to any Data Layer"
"Increase streaming distance for all landmark buildings"

UnrealPilot understands World Partition concepts and can make bulk changes that would take hours to do manually.

Start Building Open Worlds

World Partition makes large-scale development manageable. Start with proper grid sizing, use Data Layers for gameplay-driven streaming, and optimize with HLOD. The system handles the complexity so you can focus on creating your world.

Want to streamline your World Partition workflow? UnrealPilot helps you manage open world complexity with AI-powered automation.

Request beta access to UnrealPilot →