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 …
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…
Backend Services - Achievements, Leaderboards, Stats
Backend Services - Achievements, Leaderboards, Stats Integrate Steam backend services for player progression, competition, and analytics. Achievements Track and…
Styling Panels - s&box UI Documentation
Styling Panels Style your UI panels using SCSS-like stylesheets or direct code styling. Using Stylesheets Create files alongside your files: Or specify a differ…
s&box TimeSince and TimeUntil: Convenient Time Measurement Structs
s&box TimeSince and TimeUntil: Convenient Time Measurement Structs Both structs use internally and support implicit conversion from /. TimeSince Measures time e…
Networking State in s&box: IsHost, IsClient, IsActive, and Lobby Management
Networking State in s&box: IsHost, IsClient, IsActive Understanding the networking state is critical for writing correct multiplayer code in s&box. Key Properti…
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…
Time Utilities: TimeSince, TimeUntil, and Frame-Rate Independence
s&box provides time utilities for cooldowns, countdowns, and frame-rate independent movement without manual bookkeeping. Time.Delta Seconds since last frame. Mu…
Styling Panels: SCSS, Inline Styles, and Code-Based Styling
s&box panels can be styled using SCSS stylesheets, inline styles, style blocks, or direct code manipulation. The styling system uses CSS-like syntax but is rend…
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…
s&box SceneNetworkSystem: Scene Loading and Snapshot Protocol
s&box SceneNetworkSystem: Scene Loading and Snapshot Protocol is the core networking system that manages scene loading, object spawning, and snapshot synchroniz…
Achievements: Score-Based and Stat-Based Player Unlocks
s&box achievements allow players to unlock rewards with configurable scores. The API lives in . Score Each achievement has a score (5-100). Low values for easy …
ISceneLoadingEvents: Async Scene Load Hooks with BeforeLoad, OnLoad, and AfterLoad
ISceneLoadingEvents: Async Scene Load Hooks Implement on a to hook into the scene loading pipeline. The game waits for async tasks to complete before proceeding…
Storage (UGC)
Manage user-generated content, save games, and player creations. Creating Entries Entry Properties Reading Files Listing Entries Deleting Entries Steam Workshop…
Building a Networked Radio System with 3D Audio and Sync
Building a functional, interactive, and multiplayer-compatible radio system in s&box requires coordinating networked replication, local 3D audio handles, extern…
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 …
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, …
Physics Tracing Code Examples
Physics Tracing Code Examples Raycast and shape trace examples using — the builder pattern for physics queries. TraceResult Properties Builder Pattern Methods
Achievements and Services
s&box provides built-in services for achievements, stats, and leaderboards. Achievements Unlock an Achievement Achievement Types Stat-based - Auto-unlock when s…
s&box NavigationLayer: NPC navigation
NPC behavior layer that handles navigation using NavMeshAgent. Provides movement commands and status tracking. Properties Methods Behavior Uses NavMeshAgent for…