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 Editors
Custom Editors Create custom editor widgets for your classes, structs, and assets. ControlWidget (Property Editor) Create custom property editors using : Attrib…
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 …
s&box UndoSystem: Per-player undo stacks
GameObjectSystem that provides per-player undo stacks with 128-step limit. Tracks GameObjects for destruction on undo. Classes PlayerStack Per-player undo stack…
s&box SpeechLayer: NPC speech and subtitles
NPC behavior layer that manages speech state, plays sound files, and renders subtitle text above the NPC's head. Properties Methods Behavior Resolves a random s…
Leaderboards API
Implement leaderboards using s&box Services API. Submitting Scores Reading Leaderboards Leaderboard Entry Properties Web API Access Query leaderboards from exte…
s&box ResourceLibrary: Loading and Accessing Game Resources
s&box ResourceLibrary: Loading and Accessing Game Resources (and ) provides access to all loaded resources. Loading Resources ```csharp // Synchronous get (retu…
Noclip MoveMode with Collision Toggle
Noclip MoveMode Implementation Custom movement mode for noclip/fly behavior with collision toggle. Key Patterns MoveMode inheritance — override , , priority — 1…
Performance Best Practices
s&box Performance Best Practices Community guide for writing performant s&box code based on engine behavior and developer recommendations. Object Pooling Avoid …
Ownable Component Pattern for Prop Ownership
Ownable Component - Prop Ownership and Permission System A component that tracks which player spawned an object and enforces ownership-based permissions. Useful…
Sandbox.Json
Sandbox.Json JSON serialization utilities. Overview Json provides methods for serializing objects to JSON and parsing JSON strings. Serialize Deserialize Parse …
Prefab Spawning and Cloning
Prefab Spawning and Cloning Prefabs are reusable GameObject templates that can be instantiated at runtime. Creating Prefabs Create a GameObject in the scene wit…
Auth Tokens - s&box Services Documentation
Auth Tokens Auth tokens allow your game to authenticate players with external backends. The token proves the player's identity and can be validated against Face…
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…
Drag-and-drop system with static instance pattern
Drag-and-Drop System with Static Instance Pattern This example shows a drag-and-drop system using a static instance pattern for global state management and visu…
HTTP Requests: Async GET and POST with JSON in s&box
s&box provides a static class for asynchronous HTTP requests (GET, POST, DELETE, etc.) with JSON support. Allowed URLs Only or URLs to domains (no IP addresses)…
Post Processing System
Post Processing System Add visual effects like bloom, tonemapping, and film grain with post-processing volumes. Overview Post processing in s&box uses a volume-…
GameObject - s&box Documentation
GameObject A GameObject is the fundamental building block of scenes in s&box. GameObjects have a transform (position, rotation, scale), can have parents and chi…
Playing Sounds
Playing Sounds in s&box s&box provides both 2D and 3D sound playback through code and components. Quick Sound Playback Sound Handle Store the handle to control …
s&box PostProcessManager: Post-processing resource management
PostProcessManager API Reference PostProcessManager is a GameObjectSystem that manages post-processing resources with preview, toggle, and camera attachment. Ty…