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…
Console Variables - s&box Documentation
Official s&box documentation for Console Variables (ConVar) and Console Commands (ConCmd). ConVar creates variables that can be modified through the console and…
Custom Editors
Custom Editors Create custom editor widgets for your classes, structs, and assets. ControlWidget (Property Editor) Create custom property editors using : Attrib…
RPC Messages: Remote Procedure Calls with Broadcast, Owner, and Host Targets
Components can contain RPCs (Remote Procedure Calls). An RPC is a function that when called, is also called remotely on other clients. Broadcast RPC makes a fun…
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…
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…
s&box Sandbox Security Model: Assembly Whitelist, Blocked APIs, Reflection Restrictions, and Safe Assembly Caching
s&box Sandbox Security Model: Assembly Access Control and Whitelisted APIs s&box uses a whitelist-based security model to prevent game code from accessing dange…
Custom Assets - s&box Documentation
Official s&box documentation for Custom Assets - user-defined resource types. Custom Assets allow defining new asset types for your game. GameResource is the ba…
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…
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…
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…
Graphics.Draw, Blit, DrawText, DrawIcon, and GrabFrameTexture — Custom Rendering APIs
Graphics.Draw and Graphics.Blit: Custom Rendering in s&box provides low-level rendering APIs for drawing custom geometry, screen-space quads, and text. All call…
Texture Generators - s&box Editor Documentation
Texture Generators Create procedural textures in code. Generate textures from shapes, gradients, text, or any algorithm. Creating a Generator Inherit from : Pro…
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…
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…
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 …
Component.GetComponent, GetComponentInChildren, GetComponentInParent — FindMode and RequireComponent
Component.GetComponent, GetComponentInChildren, GetComponentInParent — FindMode Reference Components provide convenient lookup methods for finding other compone…
s&box Hotload System: How Code Reloading Works, SkipHotload, ConVar Persistence, and NetworkObject.OnHotload
s&box Hotload System: How Code Reloading Works s&box supports live code reloading (hotload) without restarting the game. Understanding how it works helps avoid …
Collider Component: Triggers, Surface Properties, Keyframe Bodies, Concave Shapes, and Tag Propagation
Collider Component: Triggers, Surface Properties, and Keyframe Bodies The abstract base class is the foundation for all physics colliders in s&box (, , , , ). T…
Game Resources - s&box Documentation
Official s&box documentation for Game Resources - custom asset types. GameResource allows defining custom asset types that can be created in the editor and load…