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 …
Razor Panel Structure and Syntax
Razor Panel Structure s&box uses Razor syntax for UI panels with files and optional stylesheets. Basic Panel Component File Structure The Element The element is…
Noclip MoveMode with Collision Toggle
Noclip MoveMode Implementation Custom movement mode for noclip/fly behavior with collision toggle. Key Patterns MoveMode inheritance — override , , priority — 1…
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…
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…
Async tasks in s&box — coroutines, parallel tasks, and frame-by-frame animation
Async Tasks in s&box Components s&box async tasks run on the main thread — they behave like coroutines. Use to yield one frame, to wait, and to run tasks in par…
Custom GameResource assets — defining asset types with ResourceLibrary and PostLoad registry
Custom GameResource Assets lets you define your own asset types with a custom file extension, inspector UI, and hot-reload support. Assets are JSON files under …
Physgun Grab State with Permission Checks
Physgun Grab State Pattern Implementation pattern for physgun object grabbing with ownership checks and IPhysgunEvent permissions. Key Features Sync'd GrabState…
Extensible Player Data Save Hooks for World Components
This pattern lets gameplay components plug into a player's save/load flow without putting every feature directly inside one large class. The framework has three…
s&box context menu with submenus and auto-positioning
s&box Context Menu with Submenus and Auto-Positioning This example shows a context menu system using s&box's Panel, Screen, and layout system with submenu build…
Automatic water volume setup with buoyancy physics
Automatic Water Volume Setup with Buoyancy This example shows automatic attachment of WaterVolume components to colliders tagged "water" and buoyancy physics im…
Leaderboards API
Implement leaderboards using s&box Services API. Submitting Scores Reading Leaderboards Leaderboard Entry Properties Web API Access Query leaderboards from exte…
Stats API
Track player statistics with the Stats service. Recording Stats Reading Stats Stat Types Batching Stats are automatically batched and sent periodically. Call as…
Custom editor tools — EditorTool, Gizmo drawing, scene tracing, and overlay UI
Custom Editor Tools Editor tools appear in the s&box toolbar and let you build scene editing workflows — painting, placement, custom gizmos. They must live in a…
Unit tests in s&box — MSTest setup, engine initialization, and component testing
Unit Tests in s&box s&box supports MSTest-based unit tests. Create a directory in your project folder and restart the editor — a test project is generated autom…
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…
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…
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 JSONObject Save Data Helper for Components
This s&box-focused sample shows how to programmatically construct and deconstruct JSON for component save data. It is useful for player saves, world unlock stat…
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 …