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…
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…
Game Static Class: ActiveScene, ChangeScene, TypeLibrary, Cookies, and Core State Properties
Game Static Class: ActiveScene, ChangeScene, TypeLibrary, and Core State The static class is the primary entry point for global game state in s&box. Core State …
Libraries - s&box Code Documentation
Libraries Libraries are reusable code packages you can share between projects or distribute to others. They provide a way to modularize your code and avoid dupl…
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, …
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 …
Achievements - s&box Services Documentation
Achievements s&box provides an achievements system that integrates with Steam. Achievements can be unlocked automatically based on stats or manually via code. S…
Publishing Clothing - s&box Clothing Documentation
Publishing Clothing Publish clothing assets to sbox.game for players to use. Setting up your .Clothing File Create a clothing definition asset: Right-click in A…
s&box ServerSettings: Replicated server-controlled settings
ServerSettings API Reference ServerSettings is a static class for server-controlled settings that are replicated to all clients. Type Signature Example Property…
s&box BanSystem: Ban list management with persistence
BanSystem API Reference BanSystem is a GameObjectSystem that manages a ban list with LocalData persistence and connection blocking. Type Signature Key Methods -…
BaseWeapon and BaseCarryable Weapon Framework
BaseWeapon and BaseCarryable - Weapon Framework Base classes for creating weapons in s&box. Provides ammo management, view/world models, and input handling. Bas…
API Whitelist - s&box Security Documentation
API Whitelist s&box uses a whitelist-based security model to prevent game code from accessing dangerous APIs. Only approved assemblies and types are accessible.…
RPC-based chat system with avatars and Steam filtering
RPC-Based Chat System with Avatar Support This example shows a complete chat system using Razor, RPC broadcasting, Steam filtering, and avatar display. Key Feat…
GameManager INetworkListener Pattern
GameManager INetworkListener Pattern Game manager implementing connection lifecycle with player spawning and cleanup. Implemented Interfaces INetworkListener - …
Global.ISpawnEvents Spawn Event Interface
Global.ISpawnEvents Interface Scene-wide event interface for listening to spawn operations. Implement on components to receive pre/post spawn callbacks. Interfa…
s&box EntitySpawnerEntity: Entity spawner
EntitySpawnerEntity Component API Reference EntitySpawnerEntity is a world-placed SENT that spawns another SENT at its location. Can be triggered manually via p…
Moving a SceneObject with Transform in s&box
Use to move a SceneObject each frame in s&box. This moves the object forward at 100 units per second. Prefer over direct manipulation of the SceneObject for net…
s&box ControlSystem: Chair control management
GameObjectSystem that manages chair control with seat priority sorting. Routes player input to controllable objects using ClientInput.PushScope(). Behavior Sort…
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…
Code Basics - s&box Documentation
Code Basics C# is the primary programming language for s&box. The engine uses modern .NET with hotloading support, allowing you to see code changes instantly wi…