Math Types: Vector3, Rotation, Angles, and Transform
s&box provides several math types for 3D game development in the namespace. Vectors Vector2 — 2D (x, y) for screen/UI Vector3 — 3D (x, y, z) for world positions…
Controller Input: Analog Sticks, Haptics, Motion Controls, and Local Multiplayer
s&box supports gamepad/controller input with analog sticks, haptics/rumble, motion controls, and local multiplayer. Detecting Controller Check to see if the pla…
Indirect Light Volumes: Probe-Based Global Illumination and Bounce Lighting
Indirect Light Volumes in s&box use a grid of probes to sample indirect light from all directions. When rendering, the system interpolates between nearby probes…
Scene Metadata: ISceneMetadata for Queryable Scene and Prefab Data
The interface in s&box allows Components to save data that can be accessed without loading a Scene or cloning a Prefab. Metadata is accessible via or directly. …
Input Glyphs: Device-Adaptive Button Icons for UI Hints
Input glyphs in s&box provide an easy way to show users which buttons to press for actions. They automatically adjust for whatever device is being used and retu…
Raw Input: Direct Keyboard Access Bypassing Input Actions
s&box provides raw keyboard input access that bypasses input actions. Only use this when input actions won't work — raw inputs cannot be rebound by players. Ava…
Dedicated Servers: Running Local Projects with Hidden Serverside Code
s&box dedicated servers can run entirely local projects as the game using the command line argument: Assets are still fetched from the cloud version of the game…
ActionGraph: Visual Scripting with Nodes, Links, and Control Flow
ActionGraph is s&box's visual scripting language. Each node describes an action or expression, and links between nodes carry values or signals. No C# coding req…
Ownable Component Pattern for Prop Ownership
Ownable Component - Prop Ownership and Permission System A component that tracks which player spawned an object and enforces ownership-based permissions. Useful…
Building a Networked Radio System with 3D Audio and Sync
Building a functional, interactive, and multiplayer-compatible radio system in s&box requires coordinating networked replication, local 3D audio handles, extern…
Achievements - s&box Services Documentation
Achievements s&box provides an achievements system that integrates with Steam. Achievements can be unlocked automatically based on stats or manually via code. S…
Moving a SceneObject with Transform in s&box
Use to move a SceneObject each frame in s&box. This moves the object forward at 100 units per second. Prefer over direct manipulation of the SceneObject for net…
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…
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 …
s&box Sandbox Security Model: Assembly Whitelist, Blocked APIs, Reflection Restrictions, and Safe Assembly Caching
s&box Sandbox Security Model: Assembly Access Control and Whitelisted APIs s&box uses a whitelist-based security model to prevent game code from accessing dange…
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…
Libraries - s&box Code Documentation
Libraries Libraries are reusable code packages you can share between projects or distribute to others. They provide a way to modularize your code and avoid dupl…
Door Component with IPressable Interface
Door Component with IPressable Map entity door with animated open/close using curves and the IPressable interface. Key Features AnimationCurve for smooth motion…
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…
Playing Sounds - s&box Sound Documentation
Playing Sounds s&box provides multiple ways to play audio. From simple one-shots to complex 3D spatial audio with full control. SoundEvent Create reusable sound…