Debugging and Profiling Tips
Debugging and Profiling Tips Community guide for debugging s&box games based on official tools and developer recommendations. Console Commands Useful built-in c…
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…
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…
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…
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…
Cheat Sheet: Quick Reference for s&box GameObjects, Components, and Debugging
Quick reference for common s&box operations across debugging, transforms, GameObjects, and Components. Debugging Transforms GameObjects Components
Code Basics - s&box Documentation
Code Basics C# is the primary programming language for s&box. The engine uses modern .NET with hotloading support, allowing you to see code changes instantly wi…
Code Generation - s&box Documentation
Official s&box documentation for Code Generation - compile-time code generation. Code Generation covers the source generator system in s&box. The generator crea…
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…
Networking Static Class: IsHost, IsClient, CreateLobby, Connect, SetData, and Debug Convars
Networking Static Class: IsHost, IsClient, CreateLobby, Connect, and Server Data The static class manages the multiplayer session in s&box. Session State Note: …
s&box BaseNpcLayer: NPC behavior layer base
Abstract base class for NPC behavior layers. Layers provide specific services (navigation, senses, speech) for tasks to use. Properties Methods Usage Inherit fr…
Code Cheat Sheet: Quick Reference for GameObjects, Components, and Transforms
Quick reference for common s&box operations covering debugging, transforms, GameObjects, and Components. Useful when you know what you want to do but not the ex…
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…
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 …
SceneCamera: World-to-Screen, Screen-to-World, Render Hooks, and Camera Properties
SceneCamera: World-to-Screen, Screen-to-World, and Render Hooks is the main camera class in s&box. It wraps a native frustum and provides coordinate conversion,…
s&box MountMetadata: Mount fallback rendering
MountMetadata Component API Reference MountMetadata is attached to mount-spawned props to show a graceful bounding box and hint the player which game it's from …
s&box FuncMover: Moving and rotating objects
FuncMover Component API Reference FuncMover is a Component that moves and rotates a GameObject with configurable linear and rotational movement patterns. Type S…
Reusable World-Space Interaction Prompt Framework
A small, compartmentalized interaction framework can be built from three pieces: : the base component placed on objects the player can use. : the player-side ra…
UIDecal Component - Render Razor UI as a Decal
A Render Component for s&box that allows you to project Razor UI onto surfaces as a Decal. Great for sticking UI onto rounded walls, curved surfaces, or any geo…
Application Context Flags: IsDedicatedServer, IsHeadless, IsEditor, IsVR — Runtime Context in s&box
Application Context Flags: IsDedicatedServer, IsHeadless, IsEditor, IsVR is a static class in s&box that exposes runtime context flags. These are set at startup…