Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

scene_module_inspector

The SceneModule component's card on an entity. It replaces the card's generic settings section with one built from the bound .sceneModule: the module's identity, the file that states the placement, one editable row per declared input, and a Rebuild action. The component's inspector.luau returns this module, so the editor's inspector framework (edui.inspector.componentSections) shows it wherever the component is on an entity.

A sceneModule declares its own inputs, so the set of properties a placement can edit is per module. Each declared input gets one row: a bool row for a bool, an enum row for a closed set, a number row for a number, a text row otherwise. Editing a row writes the value into the component's params, which re-runs the build in place.

buildFieldSpecs(declared, params) is the pure row mapping: one spec per declared input carrying its kind, its current value (the param override when set, else the declared default), and the members a closed-set input accepts.

local Inspector = require("@builtin::modules.editor.scene_module_inspector")
local specs = Inspector.buildFieldSpecs(moduleRef:inputs(), { seed = 3 })

statedIn(entityId) answers which file states a placement's params: the build.luau or init.luau of the build that placed the entity, or nil for a placement an author made.