IHotloadManaged: Preserving and Restoring State Across s&box Hotloads
IHotloadManaged: Preserving State Across s&box Hotloads When a class is hotloaded in s&box, all live instances are replaced with new instances of the updated ty…
LocalData persistence for server-side data
LocalData Persistence in s&box LocalData provides server-side data persistence that survives server restarts. It's useful for storing configuration, ban lists, …
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…
CleanupSystem Pattern for Map Reset and Scene Management
CleanupSystem - Scene State Management and Map Cleanup A that captures the baseline scene state and allows resetting the map to its original state. Removes spaw…
Scene Object Index: How Scene.GetAll Works — Type Hierarchy Indexing, Update Sets, and Hotload Safety
Scene Object Index: How Scene.GetAll<T> Works and Why It's Fast is the primary way to find all active components or systems of a type in the scene. Understandin…
BanSystem Pattern for Player Management
BanSystem - Player Ban Management A GameObjectSystem that manages player bans with persistent storage. Demonstrates , persistence, and RPC commands. Implementat…
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…
LocalData static class: Server-side data persistence
LocalData Static Class API Reference LocalData provides server-side data persistence that survives server restarts. It's useful for storing configuration, ban l…
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…
LimitsSystem Per-Player Spawn Limits
LimitsSystem Per-Player Limits Enforces configurable spawn limits per player with automatic tracking via ISpawnEvents. Key Features Per-player tracking via Stea…
Project Structure Recommendations
Project Structure Recommendations Community guide for organizing s&box projects based on Facepunch examples and successful community projects. Recommended Folde…
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…
Sandbox: BanSystem — persistent ban list with INetworkListener.AcceptConnection
Sandbox BanSystem — Persistent Ban List with INetworkListener is a that implements to intercept incoming connections and reject banned players before they join.…
Sandbox.Http
Sandbox.Http HTTP request utilities. Overview Http provides asynchronous methods for making HTTP requests to external services. GET Request POST Request JSON Re…
s&box MorphState: Morph value persistence
MorphState Component API Reference MorphState persists morph values on a GameObject so they survive over the network and duplication. Type Signature Properties …
Hotloading — live code reloading, IL fast path, and common pitfalls
Hotloading — Live Code Reloading s&box recompiles and live-reloads your assembly whenever you save a or file. You don't need to restart the editor for most chan…
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 …
Scene Metadata: ISceneMetadata for Queryable Scene and Prefab Data
The interface in s&box allows Components to save data that can be accessed without loading a Scene or cloning a Prefab. Metadata is accessible via or directly. …
SkinnedModelRenderer Animation Parameters: Set, SetIk, SetLookDirection, Pre-Spawn Caching, and ClearParameters
SkinnedModelRenderer Animation Parameters: Set, SetIk, SetLookDirection, and Pre-Spawn Caching stores animation parameters in a dictionary and applies them to t…
s&box AmmoInventory: Shared ammo pools
AmmoInventory Component API Reference AmmoInventory stores shared ammo pools on a player, keyed by AmmoResource. Add this component to the player prefab alongsi…