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…
Sandbox: ToolMode system — creating custom Tool Gun modes
ToolMode System — Creating Custom Tool Gun Modes is the base class for all Tool Gun tools in Sandbox. Tools are components on the Toolgun and are enabled/disabl…
s&box player management with RPC, ConCmd, and Connection APIs
s&box Player Management with RPC, ConCmd, and Connection APIs This example shows player kick/ban utilities using s&box's Connection, RPC, ConCmd, and Chat syste…
WorldPanel and ScreenPanel — HUD overlays and 3D world-space UI with Razor PanelComponent
WorldPanel and ScreenPanel — UI in the World s&box UI uses (Razor) attached to either a (HUD overlay) or (3D world-space UI). The same component works with both…
Playing Sounds
Playing Sounds in s&box s&box provides both 2D and 3D sound playback through code and components. Quick Sound Playback Sound Handle Store the handle to control …
NavMeshLink custom traversal — parabolic jump, ladder climb, and physics jump
NavMeshLink Custom Traversal connects two NavMesh points for agents to traverse (jumps, ladders, teleports). Default traversal linearly interpolates between sta…
ModelPhysics — ragdolls and per-bone physics simulation
ModelPhysics — Ragdolls and Per-Bone Physics drives physics simulation per bone on a skinned model. Use it for ragdolls, destructible characters, and physics-dr…
WebSockets
Use WebSockets for real-time communication with external servers. Basic Setup With Auth Token Common Use Cases Custom networking — External matchmaking, chat se…
CameraNoiseSystem example: Camera effects
CameraNoiseSystem Example: Camera Effects CameraNoiseSystem is a GameObjectSystem that applies temporary camera effects (shake, noise, etc.) by implementing ICa…
Multiplayer and Networking
Complete guide to multiplayer setup in s&box. Creating a Lobby Joining a Lobby Spawning Networked Players Host/Client Checks Connection Events Networked Object …
ControlSystem Pattern for Seat/Vehicle Control
ControlSystem - Seat/Vehicle Control Management A that manages control transfer between players and seated entities (vehicles, chairs). Handles input routing an…
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…
Slot-based inventory UI with BuildHash optimization
Slot-Based Inventory UI with BuildHash Optimization This example shows a slot-based inventory UI with BuildHash() optimization to prevent unnecessary rebuilds a…
VirtualGrid — efficiently rendering large scrollable lists in s&box UI
VirtualGrid — Efficiently Rendering Large Lists in UI is a s&box UI panel that virtualizes a large collection — only the visible cells are created in the DOM. S…
s&box Hints GameObjectSystem: UI hint queue
Hints GameObjectSystem Example Hints is a GameObjectSystem that manages the display of timed popup hints in the UI. It queues hints with delays and displays the…
Inventory Hotbar UI Component
Inventory HUD with Hotbar A Razor PanelComponent that displays player inventory slots as a hotbar with mouse wheel and number key support. Implementation Key Fe…
Rigidbody Physics
The component enables physics simulation on GameObjects. Basic Usage Rigidbody Properties Forces Collision Detection Wake/Sleep Spawn with Velocity
Nameplate Component with Voice Activity
Nameplate with Voice Activity A Razor component that displays player nameplates above characters with voice chat visualization. Implementation SCSS Example Key …
Storage (UGC)
Manage user-generated content, save games, and player creations. Creating Entries Entry Properties Reading Files Listing Entries Deleting Entries Steam Workshop…
Controller Input
Handle gamepad/controller input in s&box. Detecting Controllers Analog Inputs Auto-Mapped Input Haptics/Rumble Motion Controls Local Multiplayer