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 "network" 223 results closeClear
menu_bookDocumentation
May 5, 2026

Physics Events - s&box Physics Documentation

Physics Events Receive callbacks for physics events in the scene. IScenePhysicsEvents Implement this interface on a component to receive scene-wide physics even…

menu_bookDocumentation
May 4, 2026

ISceneLoadingEvents: Async Scene Load Hooks with BeforeLoad, OnLoad, and AfterLoad

ISceneLoadingEvents: Async Scene Load Hooks Implement on a to hook into the scene loading pipeline. The game waits for async tasks to complete before proceeding…

menu_bookDocumentation
May 4, 2026

ConVar and ConCmd: Console Variables and Commands in s&box

ConVar and ConCmd: Console Variables and Commands s&box uses and attributes on static properties and methods to expose them to the console system. ConVar (Conso…

menu_bookDocumentation
May 5, 2026

Citizen Characters - s&box Assets Documentation

Citizen Characters The Citizen is s&box's default human character model. It provides a standardized base for player characters, NPCs, and customization through …

terminalCode Example
May 4, 2026

Sandbox: Ownable component — prop protection with IPhysgunEvent and IToolgunEvent

Ownable Component — Prop Protection and Physgun/Toolgun Access Control The component tracks which spawned a . It implements and to enforce ownership checks when…

menu_bookDocumentation
May 20, 2026

Dedicated Servers: Running Local Projects with Hidden Serverside Code

s&box dedicated servers can run entirely local projects as the game using the command line argument: Assets are still fetched from the cloud version of the game…

menu_bookDocumentation
May 5, 2026

Animation - s&box Documentation

Animation s&box supports skeletal animation for characters and objects. Animate models using imported animations, blend between states, and control playback fro…

menu_bookDocumentation
May 5, 2026

Code Generation - s&box Documentation

Official s&box documentation for Code Generation - compile-time code generation. Code Generation covers the source generator system in s&box. The generator crea…

menu_bookDocumentation
May 4, 2026

Scene.Load and Scene.LoadFromFile: Loading Scenes, DontDestroyOnLoad, and the Loading Sequence

Scene.Load and Scene.LoadFromFile: Loading Scenes Locally loads a scene file into the current scene. This is a local-only operation — it does not bring other cl…

menu_bookDocumentation
May 5, 2026

Your First Project - s&box Documentation

Your First Project Creating Game Objects In s&box, everything in your scene is a GameObject. GameObjects can have Components attached to them that provide funct…

terminalCode Example
May 4, 2026

Sandbox: UndoSystem — per-player undo stack with bounded history (128 steps)

UndoSystem — Per-Player Undo Stack The is a that maintains a per-player undo stack. Each entry holds a set of s that get destroyed when the undo is triggered. U…

menu_bookDocumentation
May 5, 2026

ActionGraph Component Actions - s&box Documentation

ActionGraph Component Actions Add ActionGraph behavior directly to GameObjects using the ActionGraph component. Component Actions The ActionGraph component lets…

menu_bookDocumentation
May 20, 2026

Leaderboard Web API: Public REST Endpoint with Aggregation and Filtering

The s&box leaderboard Web API is publicly accessible for querying player rankings based on stats. Endpoint Parameters stat — stat name to base the leaderboard o…

menu_bookDocumentation
May 4, 2026

ISceneStartup: OnHostPreInitialize, OnHostInitialize, OnClientInitialize — Scene Initialization Hooks

ISceneStartup: Scene Initialization Hooks for GameObjectSystems provides callbacks for scene initialization events. It is intended for implementations, not comp…

menu_bookDocumentation
May 20, 2026

Serverside Code: #if SERVER Blocks and .Server.cs Files for Hidden Logic

s&box supports serverside-only code that is stripped from client builds. This only works when running local projects on dedicated servers. #if SERVER Blocks Cod…

menu_bookDocumentation
May 5, 2026

Making a Hat - s&box Clothing Documentation

Making a Hat Step-by-step guide to creating hat clothing for the Citizen character. Making Hats / Headwear Hats are worn on the head and don't need to deform wi…

terminalCode Example
May 12, 2026

s&box player management with RPC, ConCmd, and Connection APIs

s&box Player Management with RPC, ConCmd, and Connection APIs This example shows player kick/ban utilities using s&box's Connection, RPC, ConCmd, and Chat syste…

menu_bookDocumentation
May 5, 2026

Playing Sounds - s&box Sound Documentation

Playing Sounds s&box provides multiple ways to play audio. From simple one-shots to complex 3D spatial audio with full control. SoundEvent Create reusable sound…

menu_bookDocumentation
May 4, 2026

Code Upgrader Diagnostics: SBOX001-SBOX007 and SB3000 Roslyn Analyzer Warnings

Code Upgrader Diagnostics: s&box Roslyn Analyzer Warnings s&box ships a Roslyn analyzer () that warns about deprecated patterns and auto-fixes them. These appea…

terminalCode Example
May 10, 2026

Trigger-Based Background Music Crossfade Framework

This pattern replaces area music with a small local-client music framework. Each zone requests a target , while one controller crossfades the currently playing …