Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofmodule shared.module·originates fromworld 07158574-5…

swapOrchestrator

Owns the user-scope orchestration for scene swaps: leaves the prior scene's multiplayer room, gates concurrent loads via the `__scene_load.begin/finish` token, drives `scene_loader.M.load` for the new scene, and joins the new scene's room. Keeps the swap atomic from a multiplayer…

byzero-proxy @ DESKTOP-DB3UJOJ·posted 2mo ago
What it does

@builtin::assetTypes.scene.shared.swapOrchestrator

Owns the user-scope orchestration for scene swaps: leaves the prior scene's multiplayer room, gates concurrent loads via the __scene_load.begin/finish token, drives scene_loader.M.load for the new scene, and joins the new scene's room. Keeps the swap atomic from a multiplayer-sync standpoint (room transition + entity churn happen inside a single barrier).

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

module scene_swap_orchestrator Drives multiplayer room transitions + the scene-swap gate around scene load/unload events. Subscribes to layers.onUnload + layers.onBeforeLoad and translates them into a leaveRoom -> gate.begin -> teardown -> gate.finish -> joinRoom sequence. Room key is `{worldGuid}/{profile}/{mode}/{sceneGuid}` — never name-based; world and scene segments are always GUIDs (stable across renames and collaborators), and `{profile}` (runtime/editor) keeps published and live peers apart. Without this orchestrator, scene swaps world would broadcast EntityDespawn to peers still subscribed to the old room, and transient teardown state would land in the dirty file. require @builtin::assetTypes.scene.shared.swapOrchestrator

currentWorldGuid( ) → void

currentMode( ) → void

currentProfile( ) → void

Boot profile ("runtime" | "editor"). Folded into the room-key world segment so a runtime peer (published content) and an editor peer (live SpacetimeDB content) never share a room — even both in play mode. Defaults to "editor".

sceneAssetGuid(proxy: ?) → void

AssetRef envelope: { __ref, type, name, guid, identity, path }. The room key is keyed by the scene's stable GUID and nothing else — a name/identity/path would split peers that hold the same scene under different room keys. Return nil when the guid hasn't resolved yet; the caller skips the room transition rather than joining a name-keyed room.

argtypedescription
proxy?

roomKeyFor(proxy: ?) → void

argtypedescription
proxy?

isConnected( ) → void

leaveRoom(key: ?) → void

argtypedescription
key?

joinRoom(key: ?) → void

argtypedescription
key?

gateBegin( ) → void

gateFinish( ) → void

shouldOrchestrate(proxy: ?) → void

Additive overlays (editor UI, transient layers) are independent of the root scene-swap concern. Their unload/load doesn't represent a scene transition and must not touch the global broadcast gate — silencing all outbound mutations while the editor UI overlay toggles would break gameplay sync.

argtypedescription
proxy?

onUnload(proxy: ?) → void

argtypedescription
proxy?

onBeforeLoad(proxy: ?) → void

argtypedescription
proxy?

install( ) → void

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

2items
This part has no composite children. See the Files segment for its leaf payloads.
backing path · assetTypes/scene.assetType/shared.module/swapOrchestrator.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.