World Streaming runtime streaming
Runtime streaming resolves a desired cell set from streaming sources each tick, then loads, activates, and unloads within concurrency and memory budgets.
Load and unload a world
Automatic path: set /WorldStreaming/DefaultManifest to a .wsmanifest path; the system component calls LoadWorld on activate.
Manual path:
auto* wp = WorldStreaming::WorldStreamingInterface::Get();
wp->LoadWorld(manifestAssetId);
wp->IsWorldLoaded();
wp->UnloadWorld();
Master switch /WorldStreaming/Enabled must be true. When false, engine behavior matches a project without streaming.
Content Bundles
Mount an extra .wsmanifest at runtime (DLC):
wp->MountContentBundle(bundleManifestAssetId);
wp->IsContentBundleMounted(bundleManifestAssetId);
wp->UnmountContentBundle(bundleManifestAssetId);
Constraints (v1):
- Same
cellIdSaltand grids as the root world; no cell overlap; layers must match by id or introduce new ids. - Not supported on a chunked root world.
- Mount state is not part of the multiplayer handshake; ServerDriven clients should mount the same bundles as the server.
Three forms of streaming source
| Form | Model | Typical use |
|---|---|---|
WorldStreamingStreamingSourceComponent | Push | Player, camera |
RegisterStreamingSource / script handle | Push; cleared on world unload | Portal preheat, scripted zones |
WorldStreamingStreamingSourceProviderRequestBus | Pull (AppendStreamingSources) | Cinematic cameras, AI / server interest |
Streaming Source component fields
Attach to player / camera; registers on activate and follows Transform (prefers HighPrecisionTransformBus double translation).
| Field | Default | Description |
|---|---|---|
m_loadRadius / m_activateRadius | 256 / 128 m | Loaded / Activated rings; ≤0 falls back to grid defaults |
m_targetGridLevel | 0xFF (all grids) | Single target grid |
m_targetGridLevelMask | 0 | Multi-grid bitmask; non-zero overrides the field above |
m_targetHlodLayerId / m_targetHlodLayerMask | 0xFFFF / 0 | Target only specific HLOD proxy layers (non-zero mask excludes content cells) |
m_priority | Default | SourcePriority: Low / Default / High / Critical |
m_enabled | true | |
m_shapes | empty | Non-spherical coverage; when non-empty, radii are ignored |
m_orientShapesToSource | false | Shapes rotate with the entity |
m_targetBehavior | Include | Exclude carves this coverage out of the desired set |
m_loadingRangeScale | 1.0 | Multiplied with global StreamingRangeScale |
m_predictVelocity | false | EMA velocity prefetch; predicted sources rise only to Loaded, never Activate |
m_debugName / m_debugColor | empty / 0 | Labels in ws_dumpStats / overlay tint (0xRRGGBBAA) |
Coverage shapes
When m_shapes is non-empty: Sphere (default), Box, Capsule, Cone (extents.X horizontal half-angle radians, Y vertical half-angle, Z range), Polyline (m_pathPointsD, radius extents.X).
Resolve semantics
- Absolute world distance (double-precision friendly). Render-origin switches do not change desired cell state.
- Multiple Include sources merge; Exclude sources carve holes. Hard-reference bundles / DependentLoad may still pull cells to Loaded after an Exclude.
- Hysteresis defaults:
UnloadHysteresisMeters32,ActivateHysteresisMeters16,UnloadCooldownSeconds3.0. - Global
StreamingRangeScalescales radius-based sources; it does not scale explicit shapes or hysteresis.
Budgets and throttling
Setting (Runtime/) | Default | Role |
|---|---|---|
MaxConcurrentLoads / MaxConcurrentUnloads | 4 / 4 | Per-frame spawn / despawn caps |
MaxConcurrentActivations / MaxConcurrentDeactivations | 0 (unlimited) | |
MaxConcurrentStreamingCells | 0 (unlimited) | |
StreamingResolveEveryNFrames | 1 | |
MemoryBudgetBytes / PerGridMemoryBudgetBytes | 0 / empty | 0 = unlimited |
EnableHlodDowngradeUnderBudget | false | Prefer HLOD under memory pressure |
StreamingRangeScale | 1.0 | Quality-tier global scale |
GridLoadingRangeOverrides | empty | Per-grid radius overrides |
MergeProximateSourcesDistance | 0 (off) | Merge nearby sources |
StreamingPredictionSeconds / MaxStreamingPredictionDistance | 0 / 0 | Global prediction (pairs with m_predictVelocity) |
Server residency modes (Runtime/ServerStreamingMode): StreamInOut (default) / StreamInOnly / FullyResident. See
Multiplayer.
Progress, blocking, and pause
| Capability | API / command |
|---|---|
| Flush after teleport | BlockUntilStreamingComplete(maxSeconds) / ws_flushStreaming |
| Loading screen | GetStreamingProgressFraction / IsStreamingComplete |
| Area readiness (read-only) | IsLocationStreamingCompleted(posD, radius, queryState, exactState) |
| Pause (cinematics / photo mode) | SetStreamingEnabled(false) / ws_setStreamingEnabled 0 |
BlockOnSlowStreaming (default off) can auto-block when lag exceeds thresholds; AutoBlockCooldownSeconds default 5.0. World reload resets streaming enabled to on. ws_dumpStats reports streaming=PAUSED when frozen.
Notifications (C++)
WorldStreamingNotificationBus includes: OnCellStateChanged, OnCellStateTransitionDetail, OnWorldLoaded / OnWorldUnloaded, OnLayerRuntimeStateChanged, OnCellLoadFailed, OnContentLayerLoaded, OnStreamingPerformanceChanged, OnContentBundleMounted / OnContentBundleUnmounted, OnHlodFragmentVisibilityChanged.
Script-facing notifications: Scripting.
Next steps
- Content Layers / HLOD: gate and proxy content.
- Scripting: register transient sources and query progress.
- Configuration and debugging: full Runtime key and CVar tables.