Sandbox: BaseCarryable — unified AimRay, WeaponModel resolution, and seat-aware damage
BaseCarryable — Unified Weapon Base with AimRay and Seat Support is the root class for all holdable items. It handles viewmodel/worldmodel management, a unified…
DynamiteEntity Explosive Entity Pattern
DynamiteEntity - Simple Explosive Entity A simple explosive entity that can be triggered via damage or player input. Demonstrates , , and prefab cloning pattern…
Sync Properties for Networked State
Sync Properties for Multiplayer The attribute automatically synchronizes property values to all clients when they change. Basic Sync Sync Flags Customize sync b…
Custom Editors
Custom Editors Create custom editor widgets for your classes, structs, and assets. ControlWidget (Property Editor) Create custom property editors using : Attrib…
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…
ModelRenderer Material Overrides: MaterialOverride, SetMaterialOverride by Tag, Per-Index Materials Accessor, and Attachments
ModelRenderer Material Overrides: MaterialOverride, SetMaterialOverride, and Materials Accessor provides several ways to override materials on a model. Global M…
IHotloadManaged: Preserving and Restoring State Across s&box Hotloads
IHotloadManaged: Preserving State Across s&box Hotloads When a class is hotloaded in s&box, all live instances are replaced with new instances of the updated ty…
RPC Security: How s&box Validates Incoming RPCs — Attribute Check, Permission Flags, Kick on Unauthorized
RPC Security: How s&box Validates Incoming RPCs Understanding how s&box validates incoming RPCs is important for writing secure multiplayer code. Validation Ste…
Console Variables - s&box Documentation
Official s&box documentation for Console Variables (ConVar) and Console Commands (ConCmd). ConVar creates variables that can be modified through the console and…
Razor Components: Reusable UI Fragments with RenderFragment and Generics
Razor Components in s&box allow you to define reusable UI content that can be used inside other razor files. They make panels more agile and composable. Creatin…
Creating Post-Process Effects: BasePostProcess with Volume Blending and Shaders
Create custom post-processing effects in s&box by deriving from . This enables volume-based blending and custom shader rendering. The Component Key Methods GetW…
Console Variables and Commands: ConVar and ConCmd Runtime Configuration
s&box provides console variables () and console commands () for runtime configuration and debugging. Console Commands Static methods with attribute: Server Comm…
Sandbox: PlayerInventory — weapon slots, pickup, drop, and loadout persistence
Sandbox PlayerInventory — Weapon Slots, Pickup, Drop, and Loadout Persistence manages up to 6 weapon slots, handles pickup/drop logic, and delegates loadout sav…
Custom Assets: GameResource Definition with Inspector and Hotloading
Define custom asset types as in s&box. They provide inspector windows, are hotloaded in-game, and are stored as JSON files with custom extensions. Creating a Cu…
Execution Order - s&box Documentation
Execution Order Understanding the order in which component methods are called. Flowchart Component lifecycle follows a specific order: Constructor — Object crea…
GameObjectSystem with [Sync] and RPCs: Networked Scene-Level State
GameObjectSystem with [Sync]: Networked Scene-Level State supports properties just like components. However, there is a key difference: all properties on a are …
s&box PhysicalProperties: Physical property persistence
PhysicalProperties Component API Reference PhysicalProperties is a Component that persists physical properties (mass, gravity, health) across duplication and ne…
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…
s&box achievement unlocking with Rpc.FilterInclude targeting
s&box Achievement Unlocking with Rpc.FilterInclude This example shows achievement unlocking using s&box's Services.Achievements, Services.Stats, and Rpc.FilterI…
Component.GetComponent, GetComponentInChildren, GetComponentInParent — FindMode and RequireComponent
Component.GetComponent, GetComponentInChildren, GetComponentInParent — FindMode Reference Components provide convenient lookup methods for finding other compone…