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 …
WebSockets - s&box Networking Documentation
WebSockets s&box supports WebSocket connections for real-time communication with external servers. Use for custom networking, persistent data, or integrating wi…
Sandbox.Random
Sandbox.Random Random number generation. Overview Random provides methods for generating random numbers, vectors, and making random selections. Basic Random Vec…
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.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…
Sandbox: NPC system — Schedule, Task, and Layer architecture
NPC System — Schedule, Task, and Layer Architecture The Sandbox NPC system uses a layered architecture: Layers handle continuous behaviours (navigation, senses,…
Connection API: Properties, Methods, and Common Multiplayer Patterns
The class represents a network connection (client or server). Used extensively in multiplayer for identifying players, checking permissions, and managing networ…
Platform Chat: Built-in Text Chat with IChatEvent Filtering
s&box includes a built-in platform chat system for multiplayer games. Messages are routed through the host, validated, filtered via Steam's text filter, and dis…
Component Versioning: JsonUpgrader for Breaking Property Changes in s&box
s&box Component Versioning lets you define upgraders for breaking changes like property renames or data structure changes. Upgrades are chained — if a component…
Stats API
Track player statistics with the Stats service. Recording Stats Reading Stats Stat Types Batching Stats are automatically batched and sent periodically. Call as…
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…
Binary Serialization: BlobData for Large GameResource Data Storage
When JSON files grow too large in s&box, you can store data as a binary blob using the class. This works with GameResource assets and provides custom serializat…
Sync Properties: Automatic Property Replication with [Sync] Attribute
Adding the attribute to a property on a Component will have its latest value sent to other players each time it changes. Only the owner of the object can change…
CleanupSystem: Map reset and baseline restoration
CleanupSystem: Map Reset and Baseline Restoration This example shows the CleanupSystem which tracks the baseline scene state and allows resetting the map to its…
Sandbox: BaseCarryable — unified AimRay, WeaponModel resolution, and seat-aware damage
BaseCarryable — Unified Weapon Base with AimRay and Seat Support is the root class for all holdable items. It handles viewmodel/worldmodel management, a unified…
FileSystem: Mounted, Data, OrganizationData, Cache, and Memory Filesystems
FileSystem: Accessing Game Files in s&box s&box provides several filesystem access points through the static class. Available Filesystems Reading and Writing Fi…
EnvmapProbe — local reflection captures with Static, Dynamic, and OnDemand modes
EnvmapProbe — Reflection Captures in s&box is a built-in s&box component that captures a cubemap at its world position for local specular reflections. The engin…
Custom Snapshot Data - s&box Networking Documentation
Custom Snapshot Data For advanced networking, you can write and read custom data in network snapshots. This allows efficient synchronization of complex game sta…
s&box Game Static Class: Core Game State and Operations
s&box Game Static Class: Core Game State and Operations The static class provides global access to core game state, utilities, and operations. Scene Management …
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…