GitHub
GitHub - kitsupanic/sbox-mcp-plus
Contribute to kitsupanic/sbox-mcp-plus development by creating an account on GitHub.
list_scenes reports them.set_component, save_scene, undo) targets the active scene. Worse, an edit aimed at a background scene mutates the object but the dirty flag lands on the active tab — the background scene reloads from disk on focus and the edit is silently lost. Upstream: issue #11637, PR #11638 (open).play_stop first.x_editor_status
editor_status reports the game scene handle, not the active editor tab — while editing it returns a placeholder name ("Scene") and a null path, and its dirty flag can describe a different scene than its name. Upstream: issue #11639, PR #11640 (closed unmerged). x_editor_status reads SceneEditorSession.Active — the same source list_scenes uses — so the two always agree.editor_status still reports them correctly — use both.x_camera_screenshot
camera_screenshot — camera (a CameraComponent id, its game object's id, or empty for the scene's main camera), width, height, includeUi — so it's a drop-in swap.camera_screenshot renders every Razor text label as a flat gray rectangle at any size other than the live viewport's. Upstream: issue #11585. Engine root cause: CameraComponent.ResizeUI relayouts each screen panel for the offscreen size but omits RootPanel.BuildDescriptors(), so labels resized by that relayout release their text texture while the render descriptors still point at the dead one — ScreenshotService has the correct sequence (PreLayout/CalculateLayout/PostLayout/BuildDescriptors).x_camera_screenshot sidesteps it by capturing at exactly the current screen size, where the relayout changes no panel's size and no texture is released, then downscaling the capture to the requested dimensions. In edit mode there is no game viewport, so no live screen-size UI exists whose text textures a relayout could destroy, and it renders directly at the requested size — full detail, no resize step. Either way it works wherever camera_screenshot does.