Pause-Gamesflow
Pause-Games/flow/flow.navigation.proxy
Loads and enables each Flow screen's collection proxy as the navigation stack changes.
- GitHub: Pause-Games/flow — pinned to
1.0.0- Pick a release from Pause-Games/flow releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as navigation_proxy from "flow.navigation.proxy"
- Pick a release from Pause-Games/flow releases and add its Source code (zip) URL (or a packaged
Functions
attach(nav?: Flow_Navigation | undefined, opts?: Flow_ProxyAttachOptions | undefined): LuaTable
Attach the collection proxy runtime to a navigation instance. Registers "preload" and "changed" event listeners so proxies are managed automatically as screens are navigated.
When opts.sync_existing is true (the default), immediately preloads all already-registered screens with preload=true, and syncs the current active proxy if a screen is already on the stack.
Parameters
nav?:Flow_Navigation | undefined— The navigation module; defaults to flow/navigation/initopts?:Flow_ProxyAttachOptions | undefined— Options overriding DEFAULTS
Returns
LuaTable— The runtime instance (call :detach() to clean up)
detach(self: LuaMap<string, unknown> | PlainTable)
Remove all navigation event listeners and clean up the runtime. Call this in your bootstrap script's final() function to prevent leaked listeners after the script is destroyed.
Parameters
self:LuaMap<string, unknown> | PlainTable— The runtime instance created by M.attach()