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
menu_bookDocumentation
Jun 16, 2026

Building a Networked Radio System with 3D Audio and Sync

Building a functional, interactive, and multiplayer-compatible radio system in s&box requires coordinating networked replication, local 3D audio handles, extern…

menu_bookDocumentation
May 20, 2026

Input System Overview: Button Queries, Analog Input, and Escape Override

The s&box Input class provides button queries, analog input, and escape key handling for gameplay. Button Queries Analog Input Custom Keys Configure input actio…

menu_bookDocumentation
May 20, 2026

Component Interfaces: ExecuteInEditor, ICollisionListener, IDamageable in s&box

s&box provides several Component interfaces for specific purposes: editor execution, collision handling, triggers, damage, and networking. ExecuteInEditor Compo…

menu_bookDocumentation
May 20, 2026

Component Versioning: JsonUpgrader for Breaking Property Changes in s&box

s&box Component Versioning lets you define upgraders for breaking changes like property renames or data structure changes. Upgrades are chained — if a component…

menu_bookDocumentation
May 20, 2026

Shader Graph Getting Started: Visual Shader Editor in s&box

s&box Shader Graph is a visual scripting language that compiles to shader code. Accessible to beginners and useful for rapid prototyping by experienced shader d…

menu_bookDocumentation
May 20, 2026

Prefab Templates: Adding Custom Prefabs to the s&box Create Menu

s&box Prefab Templates let you add custom prefabs to the GameObject Create menu in the scene editor. Setup Enable "Show In Menu" on a Prefab File in the inspect…

menu_bookDocumentation
May 20, 2026

Cheat Sheet: Quick Reference for s&box GameObjects, Components, and Debugging

Quick reference for common s&box operations across debugging, transforms, GameObjects, and Components. Debugging Transforms GameObjects Components

menu_bookDocumentation
May 20, 2026

Scenes: Loading, Directory Lookups, and Component Queries in s&box

A s&box Scene is a collection of GameObjects. Access the current scene via on any GameObject/Component/Panel, or via . Loading Scenes GameObject Directory Every…

menu_bookDocumentation
May 20, 2026

Custom Assets: GameResource Definition with Inspector and Hotloading

Define custom asset types as in s&box. They provide inspector windows, are hotloaded in-game, and are stored as JSON files with custom extensions. Creating a Cu…

menu_bookDocumentation
May 20, 2026

Cloud Assets: Using sbox.game Models, Textures, and Sounds in Your Project

s&box provides access to a large selection of cloud assets (textures, models, sounds) from sbox.game without manual downloading or mounting. Cloud Browser Drag …

menu_bookDocumentation
May 20, 2026

GameObjectSystem: Scene-Level Batch Processing Systems in s&box

A in s&box is a scene-level system that performs work at specific points during the frame. Automatically instantiated when a scene is created — no manual setup …

menu_bookDocumentation
May 20, 2026

Razor Panels: HTML/CSS UI with C# in s&box PanelComponent System

s&box Razor Panels use web-like HTML/CSS syntax with C# for UI creation. Panels are rendered natively (not via HTML renderer) — the syntax is a convenience laye…

menu_bookDocumentation
May 20, 2026

Hotloading: Live Code Reload Without Editor Restart in s&box

s&box hotloading recompiles and live-reloads code when you save or files, without restarting the editor. How It Works IL Hotload (Fast): If only method bodies c…

menu_bookDocumentation
May 20, 2026

IsValid: Safe Null and Destroyed Object Checking in s&box

In s&box, destroying a or doesn't erase the C# reference — the variable still holds a non-null but dead object. Use instead of null checks. Common Patterns Guar…

menu_bookDocumentation
May 20, 2026

ISceneStartup: Scene Initialization Events for Host and Client Setup

The event interface in s&box allows Components and GameObjectSystems to listen to scene startup events. These run when pressing play in editor, loading a game, …

menu_bookDocumentation
May 20, 2026

Console Variables and Commands: ConVar and ConCmd Runtime Configuration

s&box provides console variables () and console commands () for runtime configuration and debugging. Console Commands Static methods with attribute: Server Comm…

menu_bookDocumentation
May 20, 2026

NavMesh Agent: AI Pathfinding Component with Crowd Control

The s&box NavMeshAgent component moves GameObjects along the NavMesh automatically with built-in crowd control to avoid collisions between agents. Component Set…

menu_bookDocumentation
May 20, 2026

Navigation: Recast NavMesh Generation and Pathfinding in s&box

s&box implements Recast Navigation (the industry standard used in Unreal, Unity, and Godot) for navmesh generation and navigation agents. What is a NavMesh? A s…

menu_bookDocumentation
May 20, 2026

Localization: Token-Based Multi-Language UI Text in s&box

s&box supports localization through token-based string replacement. Any displayed string beginning with is recognized as a localization token and replaced with …

menu_bookDocumentation
May 20, 2026

Custom Snapshot Data: INetworkSnapshot for s&box Joining Client Data Transfer

s&box Components can write and read custom data during the network snapshot process by implementing . The snapshot is sent to clients when they join a s&box mul…