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 "int" in menu_bookDocumentation 75 results closeClear
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

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

s&box UI can be created using Razor syntax — web-like HTML/CSS combined with C#. Panels are not rendered via a HTML renderer; the syntax is a convenience layer …

menu_bookDocumentation
May 20, 2026

Custom GameResource Assets: Define, Create, and Access Custom Asset Types

Define custom asset types as subclasses. They get a nice inspector window, are hotloaded in-game, and are stored as JSON files with a custom extension. Creating…

menu_bookDocumentation
May 20, 2026

Sync Properties: Automatic Property Replication with [Sync] Attribute

Adding the attribute to a property on a Component will have its latest value sent to other players each time it changes. Only the owner of the object can change…

menu_bookDocumentation
May 5, 2026

Sync Properties - Complete Networking Guide

Sync Properties Sync Attribute Adding the attribute to a property on a Component will have its latest value sent to other players each time it changes. These pr…

menu_bookDocumentation
May 20, 2026

Sync Properties: Networked State with Change Detection and Collections

The attribute on a Component property sends its latest value to other players each time it changes. Only the owner of the object can change synced properties. B…

menu_bookDocumentation
May 12, 2026

BuildHash pattern for Razor panel optimization

BuildHash Pattern for Razor Panel Optimization BuildHash is a method you can override in Razor panels to prevent unnecessary rebuilds when the underlying state …

menu_bookDocumentation
May 5, 2026

GameObjectSystem — scene-wide systems with stage-ordered execution and static access

GameObjectSystem — Scene-Wide Systems is a base class for scene-level systems that need to run at specific points in the frame — before or after physics, render…

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 5, 2026

Scene Metadata - s&box Scene Documentation

Scene Metadata You can implement the interface in any Component that has data you'd like saved to Metadata. Metadata is data that can be accessed without needin…

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

Console Variables and Commands: ConVar and ConCmd with Flags

Console variables () and commands () let you create tweakable settings and runnable commands accessible from the s&box console. Console Commands Static methods …

menu_bookDocumentation
May 4, 2026

GameObjectSystem with [Sync] and RPCs: Networked Scene-Level State

GameObjectSystem with [Sync]: Networked Scene-Level State supports properties just like components. However, there is a key difference: all properties on a are …

menu_bookDocumentation
May 4, 2026

Sandbox: PlayerInventory — weapon slots, pickup, drop, and loadout persistence

Sandbox PlayerInventory — Weapon Slots, Pickup, Drop, and Loadout Persistence manages up to 6 weapon slots, handles pickup/drop logic, and delegates loadout sav…

menu_bookDocumentation
May 12, 2026

s&box SnapGrid: World-space snap grid overlay

SnapGrid: World-Space Snap Grid Overlay SnapGrid is a sealed class that manages a world-space snap grid overlay projected onto a surface plane. It is used by th…

menu_bookDocumentation
May 5, 2026

Hotloading - s&box Documentation

Hotloading Whenever you save a code file in your project (.cs or .razor files), we recompile and attempt to live-reload the changed assembly. This lets you quic…

menu_bookDocumentation
May 20, 2026

File System: Sandboxed Virtual Filesystems for Data Persistence

Standard .NET access is restricted in s&box. Instead, use the provided virtual filesystems that sandbox access to specific game directories. Available File Syst…

menu_bookDocumentation
May 4, 2026

Sandbox: SaveSystem — scene diff save/load with versioning and ISaveEvents

Sandbox SaveSystem — Scene Diff Save/Load The captures the difference between the current scene state and the original scene file. This means saves are compact …

menu_bookDocumentation
May 5, 2026

Execution Order - s&box Documentation

Execution Order Understanding the order in which component methods are called. Flowchart Component lifecycle follows a specific order: Constructor — Object crea…

menu_bookDocumentation
May 5, 2026

GameObjectSystem - s&box Scene Documentation

GameObjectSystem GameObjectSystems are global systems that operate on groups of GameObjects. Unlike Components which are attached to single GameObjects, systems…