s&box IToolActionEvents: Tool action callbacks
IToolActionEvents Interface API Reference IToolActionEvents allows listening to tool actions across the scene. Implement this on a Component to receive callback…
PlayerData Component for Stats and Respawn
PlayerData Component Persistent player data component tracking stats (kills, deaths), respawn state, and providing connection lookup. Key Properties Connection …
Sandbox: Player spawn flow with PlayerData, events, and NetworkSpawn
Player Spawn Flow in s&box Sandbox The Sandbox game uses a (a ) to handle player connections and spawning. Here's the full pattern: GameManager spawns players o…
s&box Global.ISpawnEvents: Spawn event callbacks
Global.ISpawnEvents Interface API Reference Global.ISpawnEvents is an interface for Components that want to listen to spawn events across the scene. Implement t…
GameManager INetworkListener Pattern
GameManager INetworkListener Pattern Game manager implementing connection lifecycle with player spawning and cleanup. Implemented Interfaces INetworkListener - …
Sandbox: ISpawner interface — custom spawner pattern with ISpawnEvents
ISpawner Interface — Custom Spawner Pattern The interface defines the contract for anything that can be spawned via the spawn menu. Implementations include , , …
Sandbox: BaseConstraintToolMode — two-stage constraint creation with IToolActionEvents
BaseConstraintToolMode — Two-Stage Constraint Creation Pattern is the base for all two-point constraint tools (Weld, Rope, BallSocket, Elastic, Hydraulic, NoCol…
s&box IToolActionEvents: Tool action event interface
IToolActionEvents API Reference IToolActionEvents is a scene-wide interface for listening to toolgun actions before and after they execute. Type Signature Actio…
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…
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…
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…
Player Event Interfaces (Local and Global)
Local.IPlayerEvents and Global.IPlayerEvents Event interfaces for player lifecycle, damage, inventory, and camera events. Local fires to player hierarchy only; …
Sandbox: Full codebase architecture — systems, player components, weapons, tools, NPCs
Sandbox Codebase Architecture Overview The Facepunch Sandbox game is a large reference implementation. Here's a map of the major systems and how they connect. C…
HTTP Requests
s&box provides the static class for asynchronous HTTP requests. Allowed URLs Domains only (no IP addresses) permitted on ports: 80, 443, 8080, 8443 Use command …