ReloadSoundEntry record struct
ReloadSoundEntry Record Struct Defines a timed sound event to play during s&box weapon reload animations. Properties Time () - Seconds after reload starts to pl…
Sandbox: BaseWeapon — ammo system, reload, shoot delay, and IPlayerControllable
BaseWeapon — Ammo, Reloading, and Firing Pattern extends and adds ammo management, reloading, and a shoot delay system. It implements so it can also be used fro…
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 …
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 …
s&box Hotload System: How Code Reloading Works, SkipHotload, ConVar Persistence, and NetworkObject.OnHotload
s&box Hotload System: How Code Reloading Works s&box supports live code reloading (hotload) without restarting the game. Understanding how it works helps avoid …
Input Handling Code Examples
Input Handling Code Examples Comprehensive input examples covering buttons, analog sticks, mouse, controller, and VR input. Default Input Actions
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…
Hotloading — live code reloading, IL fast path, and common pitfalls
Hotloading — Live Code Reloading s&box recompiles and live-reloads your assembly whenever you save a or file. You don't need to restart the editor for most chan…
s&box WeaponConVars: Global weapon settings
WeaponConVars Static Class WeaponConVars is a static class that defines console variables controlling global weapon behavior in s&box. These ConVars can be set …
s&box Global.ISaveEvents: Save/load event callbacks
Global.ISaveEvents Interface API Reference Global.ISaveEvents is an interface for Components that want to listen to SaveSystem events. Implement to receive call…
BaseWeapon and BaseCarryable Weapon Framework
BaseWeapon and BaseCarryable - Weapon Framework Base classes for creating weapons in s&box. Provides ammo management, view/world models, and input handling. Bas…
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: Physgun — grab, freeze, launch, and pull mechanics
Physgun — Grab, Freeze, Launch, and Pull Mechanics The Physgun () is a that lets players grab, move, freeze, and launch physics objects. It uses a struct to tra…
GameResource: Custom Asset Types, PostLoad, PostReload, ResourceLibrary.Get, and Resource Networking
GameResource: Custom Asset Types, PostLoad, and Resource Networking is the base class for all JSON-based assets in s&box (prefabs, scene files, custom assets). …
s&box StackDirection: Stacker tool directions
s&box StackDirection Enum StackDirection is an enum used by the Stacker tool to specify which axis to stack objects along. It defines the six cardinal direction…
Hotloading: Live Code Reload Without Editor Restart in s&box
s&box hotloading recompiles and live-reloads code when you save or files, without restarting the editor. How It Works IL Hotload (Fast): If only method bodies c…
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…
Sandbox: Hydraulic tool — motorized SliderJoint with LineRenderer shaft
Sandbox Hydraulic Tool — Motorized SliderJoint Constraints The Hydraulic tool creates a between two objects with a component that can extend and retract the joi…
Sandbox: Weld tool — FixedJoint constraint with EasyMode rotation
Sandbox Weld Tool — Constraint Creation with EasyMode Rotation The Weld tool creates constraints between two GameObjects. It has an EasyMode that lets the playe…
Sandbox: LimitsSystem — server-side per-player spawn and tool limits via ConVars
LimitsSystem — Server-Side Spawn and Tool Limits is a that enforces configurable per-player limits on props, constraints, and tool entities. It listens to and .…