@modoki/engine / index / SceneLoadOptions
Interface: SceneLoadOptions
Scene & Prefabs
forceReloadBases?
optionalforceReloadBases?:string[]
Base-scene guids to treat as NOT kept even though their guid matches the old chain — i.e. force them into toDrop+toLoad so they re-fetch from disk instead of being carried from the in-memory snapshot. A base scene's own guid never changes when its FILE is edited, so a normal reload of the primary always treats it as "kept" and never sees the edit (A7, base-scene-and-persistence- plan.md) — this is the escape hatch. Used by the dev-server hot-reload path when the changed file is a base, not the primary itself.
gameId?
optionalgameId?:string|null
The game this scene belongs to, for game-scoped manager lifecycle. Set it on a real game switch (production routes through App.tsx, which knows the id) so game-scoped managers swap. Omit for in-game scene swaps and editor loads — the id is then derived from the scene path (a dev-only fallback; production paths can be hashed) and, if underivable, the active game is left unchanged so cross-scene managers persist (e.g. Station↔Warp). Pass null to explicitly clear the active game (e.g. returning to the menu).
onProgress?
optionalonProgress?: (loaded,total) =>void
Reports progress as resources finish loading.
Parameters
loaded
number
total
number
Returns
void
preloaded?
optionalpreloaded?:SceneData
Pre-parsed scene data — skips the network fetch. Used by the dev hot-reload path, which already fetched the file to validate it (avoids a second GET).
signal?
optionalsignal?:AbortSignal
External abort signal — caller can cancel via AbortController.