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…
ConVar and ConCmd — console variables and commands with flags and game settings
ConVar and ConCmd — Console Variables and Commands and are s&box attributes for exposing variables and commands to the developer console. Console Commands Conso…
Console Variables and Commands: ConVar and ConCmd with Flags
Console variables () and commands () let you create tweakable settings and runnable commands accessible from the s&box console. Console Commands Static methods …
Console Variables and Commands: ConVar and ConCmd Runtime Configuration
s&box provides console variables () and console commands () for runtime configuration and debugging. Console Commands Static methods with attribute: Server Comm…
CleanupSystem Pattern for Map Reset and Scene Management
CleanupSystem - Scene State Management and Map Cleanup A that captures the baseline scene state and allows resetting the map to its original state. Removes spaw…
Code Upgrader Diagnostics: SBOX001-SBOX007 and SB3000 Roslyn Analyzer Warnings
Code Upgrader Diagnostics: s&box Roslyn Analyzer Warnings s&box ships a Roslyn analyzer () that warns about deprecated patterns and auto-fixes them. These appea…
LimitsSystem Per-Player Spawn Limits
LimitsSystem Per-Player Limits Enforces configurable spawn limits per player with automatic tracking via ISpawnEvents. Key Features Per-player tracking via Stea…
s&box Ownable: Ownership tracking component
Ownable Component API Reference Ownable is a Component that tracks which Connection (player) spawned a GameObject, enabling prop protection and ownership checks…
s&box LimitsSystem: Spawn and tool limits
LimitsSystem GameObjectSystem API Reference LimitsSystem enforces configurable limits on spawning and tool usage. Maintains a per-player tracked object list pop…
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…
ConVar and ConCmd: Console Variables and Commands in s&box
ConVar and ConCmd: Console Variables and Commands s&box uses and attributes on static properties and methods to expose them to the console system. ConVar (Conso…
Sandbox: LimitsSystem — server-side per-player spawn and tool limits via ConVars
LimitsSystem — Server-Side Spawn and Tool Limits is a that enforces configurable per-player limits on props, constraints, and tool entities. It listens to and .…
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…
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 GamePreferences: User preferences
GamePreferences Static Class GamePreferences is a static class that defines the local user's preferences for the game. These ConVars control player-specific set…
Hotloading — live code reloading, IL fast path, and common pitfalls
Hotloading — Live Code Reloading s&box recompiles and live-reloads your assembly whenever you save a or file. You don't need to restart the editor for most chan…
s&box SaveSystem: Scene save/load
SaveSystem GameObjectSystem API Reference SaveSystem is a saving/loading system that captures the differences between the current scene state and the original s…
RPC Messages - s&box Documentation
RPC Messages Components can contain RPCs. An RPC is a function that when called, is called remotely too. Supported RPC arguments are the exact same as Sync prop…
Player Component with Static Accessors
Player Component Main player component that manages health, damage, camera, and interfaces with the inventory system. Static Accessors Key Properties HUD Visibi…
s&box GamePreferences: ConVar-based user settings with attributes
GamePreferences API Reference GamePreferences is a static class for defining user preferences using ConVar attributes with automatic persistence. Type Signature…