Sandbox.Storage
Sandbox.Storage Save and load player data. Overview Storage provides persistent storage for player data, save games, and settings with automatic Steam Cloud syn…
Working with Models and Rendering
Guide to displaying 3D models in s&box. ModelRenderer Component Loading Models SkinnedMeshRenderer (Animated Models) Dynamic Model Creation LODs (Level of Detai…
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, …
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…
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, …
Sandbox: ISpawner interface — custom spawner pattern with ISpawnEvents
ISpawner Interface — Custom Spawner Pattern The interface defines the contract for anything that can be spawned via the spawn menu. Implementations include , , …
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…
Component Lifecycle Methods Reference
Component Lifecycle Methods s&box Components have a well-defined lifecycle with specific methods you can override for different phases of initialization and upd…
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…
Binary Serialization - s&box Documentation
Official s&box documentation for Binary Serialization - efficient data storage. Binary Serialization saves data in compact binary format. The system handles ver…
Application Context Flags: IsDedicatedServer, IsHeadless, IsEditor, IsVR — Runtime Context in s&box
Application Context Flags: IsDedicatedServer, IsHeadless, IsEditor, IsVR is a static class in s&box that exposes runtime context flags. These are set at startup…
Sandbox: Duplicator tool — copy, paste, and save contraptions with DuplicationData
Duplicator Tool — Copy, Paste, and Save Contraptions The Duplicator tool copies a contraption (a connected graph of GameObjects) to JSON and pastes it back. It …
Custom GameResource assets — defining asset types with ResourceLibrary and PostLoad registry
Custom GameResource Assets lets you define your own asset types with a custom file extension, inspector UI, and hot-reload support. Assets are JSON files under …
s&box ISpawnerExtensions: Creating spawner instances
ISpawnerExtensions: Creating ISpawner Instances ISpawnerExtensions provides an extension method to create ISpawner instances from type strings, supporting vario…
RealTime vs Time: Wall-Clock vs Scene Time — RealTimeSince, RealTimeUntil, GlobalNow, and SmoothDelta
RealTime vs Time: Wall-Clock vs Scene Time — When to Use Each s&box has two time systems. Choosing the wrong one is a common source of bugs. Time (Scene Time) ,…
Project Structure Recommendations
Project Structure Recommendations Community guide for organizing s&box projects based on Facepunch examples and successful community projects. Recommended Folde…
File System - s&box Assets Documentation
File System s&box provides several file systems for different purposes - data persistence, mounted content, and organization. File Systems Data File System For …
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…
Common Pitfalls and How to Avoid Them
s&box Common Pitfalls and How to Avoid Them Community-compiled list of frequently encountered issues and their solutions, based on Discord support channels and …
s&box ISceneEvent: Scene-Wide and Per-Object Event Broadcasting
s&box ISceneEvent<T>: Scene-Wide and Per-Object Event Broadcasting is the base interface for all scene event systems. It provides static methods for broadcastin…