Custom GameResource Assets: Define, Create, and Access Custom Asset Types
Define custom asset types as subclasses. They get a nice inspector window, are hotloaded in-game, and are stored as JSON files with a custom extension. Creating…
Sync Properties - Complete Networking Guide
Sync Properties Sync Attribute Adding the attribute to a property on a Component will have its latest value sent to other players each time it changes. These pr…
GameObject - s&box Documentation
GameObject A GameObject is the fundamental building block of scenes in s&box. GameObjects have a transform (position, rotation, scale), can have parents and chi…
Controller Input
Handle gamepad/controller input in s&box. Detecting Controllers Analog Inputs Auto-Mapped Input Haptics/Rumble Motion Controls Local Multiplayer
Chat UI Pattern with RPC Broadcasting
Chat UI with RPC Broadcasting A Razor UI component for game chat that handles local input, RPC broadcasting, Steam filtering, and automatic message expiration. …
NetworkSpawn, Ownership Transfer, and Network.Refresh in s&box
NetworkSpawn and Ownership Transfer in s&box Spawning a Networked Object Ownership Transfer Modes (OwnerTransfer) Taking and Dropping Ownership Checking Ownersh…
s&box Cheat Sheet
s&box Cheat Sheet Quick reference for common s&box operations. Debugging Transforms GameObjects Components Input Networking
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…
ToolMode SelectionPoint and Trace Helpers
ToolMode.SelectionPoint and Trace Helpers Helper methods and data structures for toolgun selection and placement. SelectionPoint Struct Trace Methods Placement …
Auth Tokens - s&box Services Documentation
Auth Tokens Auth tokens allow your game to authenticate players with external backends. The token proves the player's identity and can be validated against Face…
Editor Shortcuts - s&box Editor Documentation
Editor Shortcuts Custom keyboard shortcuts make your editor tools more efficient. Shortcuts can be bound globally or to specific widgets. Creating a Static Shor…
s&box ScriptedEmitter: Particle emitter GameResource
ScriptedEmitter GameResource API Reference ScriptedEmitter is a GameResource that defines a particle/VFX emitter with a prefab, used for spawning visual effects…
Undo System - s&box Editor Documentation
Undo System The undo system allows you to make editor actions reversible. Users can press Ctrl+Z to undo changes made by your tools. Scope Based Undo Create an …
Editor Widgets
Editor Widgets Build custom editor UI using Widgets (different from in-game Panels). Creating a Widget Widget as Window Widget as Child Dockable Widget Asset Ed…
s&box ICameraSetup: Camera setup callbacks
ICameraSetup API Reference ICameraSetup is an interface for receiving callbacks during camera setup, allowing fine-grained control over camera effects before, d…
Sandbox: Ownable component — prop protection with IPhysgunEvent and IToolgunEvent
Ownable Component — Prop Protection and Physgun/Toolgun Access Control The component tracks which spawned a . It implements and to enforce ownership checks when…
s&box NetworkMode Enum and INetworkListener: Controlling Network Participation
s&box NetworkMode Enum: Controlling How GameObjects Are Networked controls how a participates in the network. Usage NetworkMode.Object The object has an owner (…
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…
Player Component with Static Accessors
Player Component Main player component that manages health, damage, camera, and interfaces with the inventory system. Static Accessors Key Properties HUD Visibi…
s&box ToolAction: Toolgun input binding
ToolAction Enums and ToolActionEntry API Reference ToolInput, InputMode, and ToolActionEntry are used by the toolgun system to bind actions to input slots with …