What it does
assets
Assets tab for the System Tools panel — library asset browser by
category + search. Input-driven (refresh = 0): the tab rebuilds
only when the user changes the category filter or types into the
search box. Snapshot data is fetched via Cache.tracked with a 2 s
TTL because the asset library updates rarely.
Exports
The module is consumed by system_tools/init.luau as a tab module:
M.label: string—"Assets", shown in the tab strip.M.refresh: number—0(input-driven).M.build(state) -> any— build the Assets widget tree for one frame.M.onCallback(callbackId: string, data: any, state) -> boolean— handle filter / search events.
Types:
AssetsState = any— opaque shell-owned state table; unused by this tab.
Usage
-- Registered by system_tools/init.luau:
local Assets = require("@builtin::modules.engine.editor.system_tools.tabs.assets")
TABS.assets = Assets
Notes
- The Lua-side snapshot is keyed by
"assets:snapshot"in the shared cache. To force a fresh fetch from another tab, callCache.invalidate("assets:snapshot"). - The visible row count is capped at 100 to keep the panel
responsive even when the library contains thousands of assets;
the
Showing X/Ycounter exposes the cap to users.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.