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; …
s&box NpcConVars: Global NPC AI settings
NpcConVars Static Class NpcConVars is a static class that defines console variables controlling global NPC AI behavior in s&box. These ConVars can be set via co…
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…
GameObjectSystem - s&box Scene Documentation
GameObjectSystem GameObjectSystems are global systems that operate on groups of GameObjects. Unlike Components which are attached to single GameObjects, systems…
s&box WeaponConVars: Global weapon settings
WeaponConVars Static Class WeaponConVars is a static class that defines console variables controlling global weapon behavior in s&box. These ConVars can be set …
Physics Events - s&box Physics Documentation
Physics Events Receive callbacks for physics events in the scene. IScenePhysicsEvents Implement this interface on a component to receive scene-wide physics even…
ModelRenderer Material Overrides: MaterialOverride, SetMaterialOverride by Tag, Per-Index Materials Accessor, and Attachments
ModelRenderer Material Overrides: MaterialOverride, SetMaterialOverride, and Materials Accessor provides several ways to override materials on a model. Global M…
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…
Stats Service: Recording and Reading Player Statistics in s&box
Games can record per-player stats using . Stats can be queried individually, per-player, or globally. Recording Stats Increment a counter: Set a value directly:…
Indirect Light Volumes (DDGI) — dynamic global illumination probe grid
Indirect Light Volumes (DDGI) places a probe grid for dynamic global illumination — light bouncing off surfaces tints nearby objects, and sunlight fades natural…
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…
Backend Services - Achievements, Leaderboards, Stats
Backend Services - Achievements, Leaderboards, Stats Integrate Steam backend services for player progression, competition, and analytics. Achievements Track and…
Mapping - s&box Editor Documentation
Mapping s&box includes Hammer, the Source 2 level editor, for creating maps and environments. Build worlds with brushes, props, lighting, and gameplay entities.…
Scene setup checklist — minimum viable scene with lighting, post-processing, and physics
Scene Setup Checklist for New Projects A quick reference for the components every new s&box scene typically needs. Minimum Viable Scene Lighting Post-Processing…
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…
Sandbox.PhysicsWorld
Sandbox.PhysicsWorld Access to the physics simulation. Overview PhysicsWorld provides access to the physics simulation, including gravity, time step, and broad …
s&box built-in component quick reference — rendering, physics, navigation, UI, and audio
s&box Component Quick Reference A cheat sheet of the most commonly used built-in components and what they do. Rendering Lighting Physics Navigation UI Audio Gam…
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 …
GameObjectSystem — scene-wide systems with stage-ordered execution and static access
GameObjectSystem — Scene-Wide Systems is a base class for scene-level systems that need to run at specific points in the frame — before or after physics, render…
ISceneStartup: OnHostPreInitialize, OnHostInitialize, OnClientInitialize — Scene Initialization Hooks
ISceneStartup: Scene Initialization Hooks for GameObjectSystems provides callbacks for scene initialization events. It is intended for implementations, not comp…