entity_details
Floating window showing the selected entity's hierarchy + components.
Built alongside entities.module — that tab owns the selection
state on state.entityDetails. This screen is REGISTERED as a
second screen by system_tools/init.luau's extraScreens.details,
so it can be docked / closed independently of tab focus. Returns
nil when no entity is selected, so Z.app skips the screen push.
Hierarchy fields (parentId, children) come from the direct-id
getEntityDetailsTable(id) path; the per-component dump comes from
the legacy no-arg getEntityDetailsTable() payload populated by
requestEntityDetails(id). Clicking a parent or child link flips
state.entityDetails.id and re-requests — navigating the details
window without leaving the inspector.
Exports
M.refresh: number—0.5(2 Hz).M.buildScreen(state) -> any— build the floating window widget tree, ornilwhen no entity is selected.M.onCallback(callbackId: string, data: any, state) -> boolean— handle hierarchy nav, window close, and per-component field edits.
Types:
EntityDetailsState = any— shell-owned state table; readsentityDetails = { id, open }.
Usage
-- Registered by system_tools/init.luau:
local EntityDetails = require("@builtin::modules.engine.editor.system_tools.tabs.entity_details")
extraScreens.details = {
build = function(state) return EntityDetails.buildScreen(state) end,
refresh = EntityDetails.refresh,
onCallback = EntityDetails.onCallback,
}
Notes
- Components with names in
DEFAULT_OPEN(Transform,Name,Tags,AnimationPlayerComponent) render with theirZ.collapsibleopen by default; everything else starts collapsed. - The cache key
"entities:details"is invalidated whenever selection changes or a component field is edited so the next build sees fresh data. ComponentView.renderis wrapped inpcallso a single broken renderer can't crash the whole inspector; the fallback is a monospacetostring(data)block.
Scoped to this part · feeds back into the world's score.