The script surface deliberately uses only scalars and world positions (no opaque CellId). It is available from Script Canvas, Lua, and editor Python (azlmbr.worldstreaming). Full signatures live in WorldStreaming/WorldStreamingBus.h.
WorldStreamingRequestBus (runtime, single handler)
World and queries
| Event | Notes |
|---|
IsWorldLoaded() / GetManifestVersion() | |
GetCellStateAtPosition(posD, gridLevel, layerId) | Returns CellRuntimeState_* |
IsServerAuthorityEnforced() / GetServerAuthorizedCellCount() | Multiplayer |
GetCellShardAtPosition(.) / IsCellOwnedByThisServerAtPosition(.) | Server shards |
Transient streaming sources
| Event | Notes |
|---|
RegisterStreamingSource(posD, forwardD, loadRadius, activateRadius, targetGridLevel, priority) | Returns non-zero handle |
UpdateStreamingSourcePosition(handle, posD) | |
SetStreamingSourceEnabled(handle, enabled) | |
SetStreamingSourceGridMask / SetStreamingSourceHlodLayerMask | |
SetStreamingSourceTargetBehavior | TargetBehavior_Include / Exclude |
SetStreamingSourceLoadingRangeScale | |
UnregisterStreamingSource / IsStreamingSourceCompleted | |
Progress and blocking
| Event | Notes |
|---|
BlockUntilStreamingComplete(maxSeconds) | Flush after teleport |
SetStreamingEnabled / IsStreamingEnabled | Pause / resume |
GetStreamingProgressFraction / GetDesiredCellCount / GetCellsAtTargetCount / IsStreamingComplete | Loading screens |
GetContentLayerStreamingProgressFraction / .ByName | Per-layer progress |
GetStreamingPerformanceState | Ok 0 / Slow 1 / Critical 2 |
IsLocationStreamingCompleted(posD, radius, queryState, exactState) | radius ≤ 0 falls back to grid default load radius |
Content Layers, ranges, bundles
| Group | Events |
|---|
| Layers | SetContentLayerState / GetContentLayerState / GetEffectiveContentLayerState / SetContentLayerEnabled / IsContentLayerEnabled / FindContentLayerId / *ByName (unknown name → 0xFFFF) |
| Range overrides | SetGridLoadingRangeOverride / ClearGridLoadingRangeOverrides |
| Bundles | MountContentBundle / UnmountContentBundle / IsContentBundleMounted / GetMountedContentBundleCount |
Behavior constants
| Family | Values |
|---|
CellRuntimeState_* | Unloaded 0 / Loaded 2 / Activated 4 (in-between = transitions) |
LayerRuntimeState_* | Unloaded 0 / Loaded 1 / Activated 2 |
SourcePriority_* | Low 0 / Default 1 / High 2 / Critical 3 |
TargetBehavior_* | Include 0 / Exclude 1 |
StreamingPerformance_* | Ok 0 / Slow 1 / Critical 2 |
Lua example — teleport flush
-- destinationD is the teleport target's double-precision world position (Vector3d)
WorldStreamingRequestBus.Broadcast.BlockUntilStreamingComplete(5.0)
if WorldStreamingRequestBus.Broadcast.IsLocationStreamingCompleted(destinationD, 128.0, CellRuntimeState_Activated, false) then
-- 128 m around the destination is Activated; dismiss the loading screen
end
WorldStreamingScriptNotificationBus (multiple handlers)
OnWorldLoaded(manifestVersion) / OnWorldUnloaded()OnContentLayerStateChanged(layerId, state) / OnContentLayerEnabledChanged(layerId, enabled)OnContentLayerLoaded(layerId) — all desired cells of a layer reached targetOnCellLoadFailedAt(cellCenterD, gridLevel, layerId)OnStreamingPerformanceChanged(old, new)OnContentBundleMounted(bundleId) / OnContentBundleUnmounted(bundleId)
EditorWorldStreamingRequestBus (editor / Python)
| Group | Events |
|---|
| World authoring | AuthorWorldBegin(salt) → AuthorWorldAddGrid / AuthorWorldAddHlodLayer / AuthorWorldSetShardSize → AuthorWorldCommit |
| Bake | BakeWorld / BakeRegion / BakeGridLevel → BakeReport (m_ok, m_shardsSaved, m_cellCount, m_warnings); SaveDirtyShards |
| Editor loading | SetFocusLoadingEnabled; Loaded Regions: AddLoadedRegionAroundCamera / RemoveLoadedRegion / SetLoadedRegionEnabled |
| Shards | FocusEditCellShard / ClearEditCellShardFocus / GetRegisteredShardCount / GetShardPathAtPosition; SetAutoCreateShardsOnFirstContent |
| HLOD GPU | IsGpuCaptureAvailable / BakeGpuOctahedralImpostors / CaptureOctahedralImpostorScreenshots |
| Status | RefreshFromLevel / HasWorld / GetCameraCell / GetCameraPositionD |
Python example — author a world
import azlmbr.worldstreaming as wp
bus = azlmbr.bus
wp.EditorWorldStreamingRequestBus(bus.Broadcast, 'AuthorWorldBegin', 1234)
wp.EditorWorldStreamingRequestBus(bus.Broadcast, 'AuthorWorldAddGrid', 0, 128.0, 256.0, 128.0)
wp.EditorWorldStreamingRequestBus(bus.Broadcast, 'AuthorWorldAddHlodLayer', 0, 0, 1, 4, 2048.0)
wp.EditorWorldStreamingRequestBus(bus.Broadcast, 'AuthorWorldSetShardSize', 0.0)
wp.EditorWorldStreamingRequestBus(bus.Broadcast, 'AuthorWorldCommit')
C++ integration points
WorldStreaming::WorldStreamingInterface::Get() (AZ::Interface<IWorldStreamingSystem>, WorldStreaming/IWorldStreamingSystem.h): full surface beyond script buses—world lifecycle (LoadWorld / UnloadWorld / GetManifestHandshake), Content Bundle mounting, streaming-source registration (entity / script handle / IsAreaStreamingCompleted), progress (GetStreamingProgress), Content Layer tri-state, cell queries (GetCellState / GetCellAtPosition / EnumerateCellsInRange / GetCellBoundsD), runtime settings, multiplayer (client interest, SetServerAuthorityEnforced, ApplyServerCellTargetStates, shard ownership), and GetDebugStats.WorldStreamingNotificationBus: C++ notifications including OnCellStateChanged, OnCellStateTransitionDetail, OnHlodFragmentVisibilityChanged, plus layer / world / bundle / performance events.WorldStreamingStreamingSourceProviderRequestBus: pull-model provider—implement AppendStreamingSources; polled once per resolve pass; zero overhead when nothing connects.
Next steps