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…
ToolMode Base Class for Toolgun Modes
ToolMode Base Class Abstract base class for creating toolgun modes in s&box. Handles input registration, action dispatch, and HUD rendering. Class Overview Acti…
s&box IToolActionEvents: Tool action callbacks
IToolActionEvents Interface API Reference IToolActionEvents allows listening to tool actions across the scene. Implement this on a Component to receive callback…
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 …
Sandbox: BaseConstraintToolMode — two-stage constraint creation with IToolActionEvents
BaseConstraintToolMode — Two-Stage Constraint Creation Pattern is the base for all two-point constraint tools (Weld, Rope, BallSocket, Elastic, Hydraulic, NoCol…
s&box IToolInfo: Tool information display interface
IToolInfo API Reference IToolInfo is an interface for providing tool information display in the UI, such as in the spawn menu or tool selector. Type Signature P…
s&box ICookieSource: Cookie persistence interface
ICookieSource API Reference ICookieSource is an interface for components that want to save their properties as cookies (persistent user preferences stored in Ga…
BaseConstraintToolMode for Constraint Tools
BaseConstraintToolMode Abstract Class Base class for two-stage constraint tools (weld, rope, elastic, etc.) with selection point handling. Class Overview Contro…
Sandbox: Stacker tool — duplicate objects in a line or arc with StackAlignMode
Stacker Tool — Duplicate Objects in a Line or Arc The Stacker tool clones a selected object N times along a configurable axis with optional rotation and gap. It…
Sandbox: Full codebase architecture — systems, player components, weapons, tools, NPCs
Sandbox Codebase Architecture Overview The Facepunch Sandbox game is a large reference implementation. Here's a map of the major systems and how they connect. C…
s&box IToolActionEvents: Tool action event interface
IToolActionEvents API Reference IToolActionEvents is a scene-wide interface for listening to toolgun actions before and after they execute. Type Signature Actio…
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…
Sandbox: Duplicator tool — copy, paste, and save contraptions with DuplicationData
Duplicator Tool — Copy, Paste, and Save Contraptions The Duplicator tool copies a contraption (a connected graph of GameObjects) to JSON and pastes it back. It …