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…
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…
ScreenPanel and WorldPanel: AutoScale Strategies, ZIndex, LookAtCamera, and Interaction Range
ScreenPanel and WorldPanel: UI Components in s&box Scenes ScreenPanel is the root component for 2D screen-space UI. It renders attached children to the screen. …
Sandbox: Map entities — Door, Button, FuncMover, TriggerPush, TriggerTeleport
Sandbox Map Entities — Door, Button, FuncMover, TriggerPush, TriggerTeleport These components implement interactive map elements. They live in the namespace and…
Component Event Interfaces for Tool Interactions
Component Event Interfaces (IPhysgunEvent, IToolgunEvent) Event interfaces that allow components to respond to tool interactions. These use s&box's pattern for …
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…
s&box Ownable: Ownership tracking component
Ownable Component API Reference Ownable is a Component that tracks which Connection (player) spawned a GameObject, enabling prop protection and ownership checks…
Collision and Triggers
Working with physics collisions and trigger volumes. Collision Components Basic Collision Trigger Volumes Triggers detect overlap without blocking movement: Col…
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…
Project Structure Recommendations
Project Structure Recommendations Community guide for organizing s&box projects based on Facepunch examples and successful community projects. Recommended Folde…
s&box IToolgunEvent: Toolgun selection interception
IToolgunEvent Interface API Reference IToolgunEvent is an interface for Components that want to intercept toolgun selection attempts. Implement to allow or reje…
s&box DroppedWeapon: Weapon pickup
DroppedWeapon Component API Reference DroppedWeapon handles weapon pickup when a weapon is dropped in the world. Implements IPressable for interaction and Playe…
Input Handling Code Examples
Input Handling Code Examples Comprehensive input examples covering buttons, analog sticks, mouse, controller, and VR input. Default Input Actions
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…
MainThread.Queue: Running Code on the Main Thread from Worker Threads
MainThread.Queue: Running Code on the Main Thread from Worker Threads s&box is single-threaded for game logic. If you have code running on a worker thread (e.g.…
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…
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…
Component Marker Interfaces: ExecuteInEditor, DontExecuteOnServer, IDamageable, INetworkSpawn, IPressable, INetworkVisible
Component Marker Interfaces: ExecuteInEditor, DontExecuteOnServer, IDamageable, INetworkSpawn, IPressable s&box uses marker interfaces nested inside the class t…
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…
Testing Multiplayer: New Instances, Hotloading, and Local Connect
s&box provides built-in tools for testing multiplayer without needing another player. You can spawn additional game instances that join your running session, wi…