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.…
Camera and View Control
Working with cameras and player viewpoints in s&box. Main Camera Access Creating a Player Camera First-Person Camera Screen to World Ray World to Screen Camera …
Libraries
Libraries Create reusable, shareable code and asset libraries. Structure Libraries live in folder: How It Works Game code references all installed libraries Lib…
Component Editor Tools: Selection-Based Scene View UI and Gizmos
Component Editor Tools in s&box are always active when a specific Component is selected. They create UI in the scene view and can override input. An example is …
Sandbox.VrAnchor
Sandbox.VrAnchor Locks VR player position. Overview VrAnchor locks the player's playspace to a GameObject's transform. Essential for seated VR, vehicles, and ro…
Libraries: Reusable Code Packages with Source Sharing
s&box Libraries are self-contained code and asset packages stored in your project's folder. They enable code reuse across multiple projects and can be shared wi…
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…
DebugOverlay — in-game visualization for spheres, lines, text, and traces
DebugOverlay — In-Editor and In-Game Visualization draws shapes, text, and traces in the world for debugging. All draws are temporary and disappear after a spec…
Network visibility — culling networked objects per client with INetworkVisible
Network Visibility — Culling Networked Objects Per Client Network visibility controls whether a networked object sends updates (Sync Vars, transforms) to a spec…
s&box BanSystem: Ban list management with persistence
BanSystem API Reference BanSystem is a GameObjectSystem that manages a ban list with LocalData persistence and connection blocking. Type Signature Key Methods -…
s&box BanSystem: Player ban management
BanSystem GameObjectSystem API Reference BanSystem holds a banlist and can ban users. Implements INetworkListener to reject banned connections. Bans are persist…
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 …
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…
BanSystem Pattern for Player Management
BanSystem - Player Ban Management A GameObjectSystem that manages player bans with persistent storage. Demonstrates , persistence, and RPC commands. Implementat…
Editor Widgets
Editor Widgets Build custom editor UI using Widgets (different from in-game Panels). Creating a Widget Widget as Window Widget as Child Dockable Widget Asset Ed…
Shaders in s&box - HLSL and Shading Models
Shaders in s&box - HLSL and Shading Models Write custom shaders in HLSL with Source 2's shading models, render states, and GPU instancing support. Shader Develo…
Sandbox.Log
Sandbox.Log Static logging class for console output. Overview Log messages appear in the editor console, in-game console (press ), and log files. Logging Method…
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…
Navigation: Recast NavMesh Generation and Pathfinding in s&box
s&box implements Recast Navigation (the industry standard used in Unreal, Unity, and Godot) for navmesh generation and navigation agents. What is a NavMesh? A s…
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…