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
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…
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: …
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…
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,…
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…
FixedUpdate Internals: Step Counting, Spiral of Death Prevention, Time.Scope, and ApplyForce vs ApplyImpulse
FixedUpdate Internals: How the Fixed Timestep Works in s&box The s&box fixed update system uses a step-counting approach rather than accumulating time. This is …
s&box Cheat Sheet
s&box Cheat Sheet Quick reference for common s&box operations. Debugging Transforms GameObjects Components Input Networking
Scene Tracing: Raycasts, Sphere Traces, and Box Traces
Scenes can be traced against using with a builder pattern. At minimum, traces need a shape, start, and end. You can filter by tags or use your project's collisi…
HudPainter: Immediate-Mode HUD Drawing in s&box
Each has a property (HudPainter) for immediate-mode drawing onto the screen. More efficient than UI panels since there's no layout, stylesheets, or interactivit…
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 …
Testing Multiplayer - s&box Networking Documentation
Testing Multiplayer s&box provides tools for testing multiplayer locally without needing multiple computers or Steam accounts. New Instance Launch a second game…
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…
Tracing: Scene Traces with Ray, Sphere, and Box Shapes
Scenes can be traced against using with a builder pattern. At minimum, traces need a shape, start, and end position. You can filter by tags or use your project'…