Input - s&box Gameplay Documentation
Input s&box provides a comprehensive input system that handles keyboard, mouse, and gamepad input. The input system uses named actions defined in your project s…
SceneTraceResult: All Fields and Properties from Trace Hits
is returned by and contains all information about a trace hit. Key Fields Common Usage Pattern
Mapping in s&box
Mapping in s&box s&box includes Hammer, the Source 2 level editor, for creating maps. Opening Hammer Main Menu → Tools → Hammer Or click Hammer icon in toolbar …
Controller Input
Handle gamepad/controller input in s&box. Detecting Controllers Analog Inputs Auto-Mapped Input Haptics/Rumble Motion Controls Local Multiplayer
s&box AmmoInventory: Shared ammo pools
AmmoInventory Component API Reference AmmoInventory stores shared ammo pools on a player, keyed by AmmoResource. Add this component to the player prefab alongsi…
Connection Class: Local, Host, All, Find, Permissions, Kicking, and Visibility Origins
Connection Class: Local, Host, All, Find, and Permissions represents a network connection to a player. It's the primary way to identify and interact with player…
Styling Panels - s&box UI Documentation
Styling Panels Style your UI panels using SCSS-like stylesheets or direct code styling. Using Stylesheets Create files alongside your files: Or specify a differ…
Math Types - s&box Documentation
Official s&box documentation for Math Types including Vector3, Rotation, Angles, and related types. Vector3 represents 3D positions and directions with X, Y, Z …
Sandbox.Light
Sandbox.Light Illuminates the scene. Overview Light component adds dynamic lighting to GameObjects. Supports point, spot, and directional lights. Setup Light Ty…
CharacterController — capsule movement, ground checks, and velocity control
CharacterController in s&box is a built-in s&box component for capsule-based movement. Unlike , you control velocity directly — the controller handles collision…
Sandbox.Transform - Position, Rotation and Scale
Sandbox.Transform Position, rotation, and scale combined. Overview Transform combines position, rotation, and scale into a single matrix for efficient calculati…
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…
Scene Events: Interface-Based Broadcasting and Listening
s&box uses interface-based events to broadcast and listen to events within a scene. Events are sent to active Components and GameObjectSystems — they are NOT se…
Sandbox: BaseWeapon — ammo system, reload, shoot delay, and IPlayerControllable
BaseWeapon — Ammo, Reloading, and Firing Pattern extends and adds ammo management, reloading, and a shoot delay system. It implements so it can also be used fro…
Sandbox: Duplicator tool — copy, paste, and save contraptions with DuplicationData
Duplicator Tool — Copy, Paste, and Save Contraptions The Duplicator tool copies a contraption (a connected graph of GameObjects) to JSON and pastes it back. It …
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…
Collider types — Box, Sphere, Capsule, Model, Hull, Plane, and Trigger volumes
Collider Types s&box provides several collider components for physics shapes. All colliders can be set as triggers (no physical response, just overlap detection…
Component Events - s&box Scene Documentation
Component Events Components can broadcast and listen for events. This provides a decoupled way for components to communicate without direct references. Event In…
s&box ResourceLibrary: Loading and Accessing Game Resources
s&box ResourceLibrary: Loading and Accessing Game Resources (and ) provides access to all loaded resources. Loading Resources ```csharp // Synchronous get (retu…
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…