auto_stories

s&box MCP Knowledgebase

Documentation, API references, code examples and community knowledge for s&box development.

library_books 595 entries menu_book 352 Documentation code 133 API Reference terminal 100 Code Example groups 10 Community
Results for "editor" in terminalCode Example 12 results closeClear
terminalCode Example
May 5, 2026

Custom editor tools — EditorTool, Gizmo drawing, scene tracing, and overlay UI

Custom Editor Tools Editor tools appear in the s&box toolbar and let you build scene editing workflows — painting, placement, custom gizmos. They must live in a…

terminalCode Example
May 3, 2026

DynamiteEntity Explosive Entity Pattern

DynamiteEntity - Simple Explosive Entity A simple explosive entity that can be triggered via damage or player input. Demonstrates , , and prefab cloning pattern…

terminalCode Example
May 10, 2026

s&box JSONObject Save Data Helper for Components

This s&box-focused sample shows how to programmatically construct and deconstruct JSON for component save data. It is useful for player saves, world unlock stat…

terminalCode Example
May 5, 2026

DebugOverlay — in-game visualization for spheres, lines, text, and traces

DebugOverlay — In-Editor and In-Game Visualization draws shapes, text, and traces in the world for debugging. All draws are temporary and disappear after a spec…

terminalCode Example
May 3, 2026

Prefab Spawning and Cloning

Prefab Spawning and Cloning Prefabs are reusable GameObject templates that can be instantiated at runtime. Creating Prefabs Create a GameObject in the scene wit…

terminalCode Example
May 5, 2026

Custom GameResource assets — defining asset types with ResourceLibrary and PostLoad registry

Custom GameResource Assets lets you define your own asset types with a custom file extension, inspector UI, and hot-reload support. Assets are JSON files under …

terminalCode Example
May 3, 2026

Playing Sounds

Playing Sounds in s&box s&box provides both 2D and 3D sound playback through code and components. Quick Sound Playback Sound Handle Store the handle to control …

terminalCode Example
May 5, 2026

Unit tests in s&box — MSTest setup, engine initialization, and component testing

Unit Tests in s&box s&box supports MSTest-based unit tests. Create a directory in your project folder and restart the editor — a test project is generated autom…

terminalCode Example
May 10, 2026

Reusable World-Space Interaction Prompt Framework

A small, compartmentalized interaction framework can be built from three pieces: : the base component placed on objects the player can use. : the player-side ra…

terminalCode Example
May 20, 2026

NavMesh Links: Custom Jump and Ladder Traversal for AI Agents

NavMesh Links connect disconnected NavMesh regions (jumps, ladders, teleports). By default agents linearly interpolate between endpoints, but you can implement …

terminalCode Example
May 10, 2026

Extensible Player Data Save Hooks for World Components

This pattern lets gameplay components plug into a player's save/load flow without putting every feature directly inside one large class. The framework has three…

terminalCode Example
May 5, 2026

EnvmapProbe — local reflection captures with Static, Dynamic, and OnDemand modes

EnvmapProbe — Reflection Captures in s&box is a built-in s&box component that captures a cubemap at its world position for local specular reflections. The engin…