AgentSkillsCN

Levels Maps

创建关卡、组织世界场景,或在Unreal Engine中配置流式加载。

SKILL.md
--- frontmatter
description: Creating levels, organizing worlds, or configuring streaming in Unreal Engine

UE5 Levels & Maps

Best practices for level organization and World Partition in Unreal Engine 5.

Folder Organization

All maps in a dedicated folder:

code
Content/
└── ProjectName/
    └── Maps/
        ├── MainMenu/
        │   └── L_MainMenu.umap
        ├── Gameplay/
        │   ├── L_Level01.umap
        │   └── L_Level02.umap
        └── Test/
            └── L_TestMap.umap

World Partition (UE5)

Strongly recommended - replaces legacy level streaming.

Benefits

FeatureDescription
Grid-based streamingAutomatic cell loading/unloading
One-file-per-actorBetter team collaboration
Data LayersRuntime actor organization
No manual streaming volumesAutomatic based on distance

Setup

  1. Create new level with World Partition enabled
  2. Configure grid cell size (default: 12800 units)
  3. Set up streaming sources

Data Layers

Organize actors and toggle visibility at runtime:

Layer TypeUse Case
Runtime Data LayersToggle at runtime (day/night variants)
Editor Data LayersEditor organization only
cpp
// Toggle data layer at runtime
UDataLayerSubsystem* DataLayerSubsystem = GetWorld()->GetSubsystem<UDataLayerSubsystem>();
DataLayerSubsystem->SetDataLayerRuntimeState(DataLayer, EDataLayerRuntimeState::Activated);

Streaming Sources

Control what areas load based on:

SourceDescription
PlayerControllerDefault, loads around players
Custom SourcesCameras, vehicles, AI
cpp
// Register custom streaming source
GetWorld()->GetWorldPartition()->RegisterStreamingSourceProvider(MyStreamingSource);

One-File-Per-Actor (OFPA)

Enable for team collaboration:

BenefitDescription
Reduced conflictsEach actor in separate file
Parallel workMultiple team members, same level
Better diffsSmaller, focused changes

Quality Checklist

CheckDescription
Zero map errorsRun Map Check, fix all issues
Zero warningsAddress all warnings
Lighting builtBuild lighting before distribution
No Z-fightingFix overlapping geometry
Streaming testedVerify smooth loading

Best Practices

PracticeReason
Use World PartitionModern streaming, collaboration
Enable OFPATeam workflow
Set up Data LayersRuntime organization
Configure grid size appropriatelyBalance streaming granularity
Test streaming on target hardwareVerify performance

Legacy Level Streaming

If not using World Partition:

code
Persistent Level
├── Sublevel_Gameplay
├── Sublevel_Lighting
├── Sublevel_Audio
└── Sublevel_Cinematics

Use Level Streaming Volumes or Blueprint to control loading.

Performance Tips

TipBenefit
Appropriate grid cell sizeBalance load frequency vs. memory
HLOD for distant objectsReduced draw calls
Proper actor boundsAccurate culling
Streaming source prioritiesLoad important areas first

Common Issues

IssueSolution
Actors not streamingCheck grid placement, bounds
Slow loadingReduce cell size, optimize assets
Pop-inAdjust loading distance, use HLOD
Collaboration conflictsEnable OFPA

Documentation: https://dev.epicgames.com/documentation/en-us/unreal-engine/world-partition-in-unreal-engine