s&box TimeSince and TimeUntil: Convenient Time Measurement Structs
s&box TimeSince and TimeUntil: Convenient Time Measurement Structs Both structs use internally and support implicit conversion from /. TimeSince Measures time e…
Physgun Grab State with Permission Checks
Physgun Grab State Pattern Implementation pattern for physgun object grabbing with ownership checks and IPhysgunEvent permissions. Key Features Sync'd GrabState…
Trigger-Based Background Music Crossfade Framework
This pattern replaces area music with a small local-client music framework. Each zone requests a target , while one controller crossfades the currently playing …
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…
s&box Tracer: Projectile trail renderer
Tracer Renderer Component API Reference Tracer is a Renderer component that creates a tracer effect (like bullet trails) that travels from its world position to…
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…
TraceAttackInfo record struct
TraceAttackInfo Record Struct Information about a trace-based attack in s&box, used to pass attack data through the weapon system. Properties Target () - The Ga…
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 …
BulletConfiguration record struct
BulletConfiguration Record Struct Configuration for s&box bullet weapon behavior including damage, spread, and recoil. Properties Damage () - Base damage per bu…
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…
Graphics.Draw, Blit, DrawText, DrawIcon, and GrabFrameTexture — Custom Rendering APIs
Graphics.Draw and Graphics.Blit: Custom Rendering in s&box provides low-level rendering APIs for drawing custom geometry, screen-space quads, and text. All call…
Inspector property attributes — Range, Group, ShowIf, Title, Feature, and more
Inspector Property Attributes Attributes control how component properties appear in the s&box editor inspector. Apply them alongside on your component fields to…
Math types — Vector3, Rotation, Angles, Transform, TimeSince, and BBox
Math Types — Vector3, Rotation, Angles, and Transform s&box uses its own math types. Here's a practical reference for the ones you'll use constantly. Vector3 Ro…
DamageInfo: The Standard Damage Payload — Properties, Usage, and Custom Types
DamageInfo: The Standard Damage Payload is a class (not a struct) used to pass damage information between game systems. It is intentionally a class so games can…
DisplayInfo: Querying s&box Type and Member Metadata (Title, Icon, Group, Tags)
DisplayInfo: Querying s&box Type and Member Metadata is an s&box struct that aggregates all display-related metadata from attributes on a type or member. The ed…
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…
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…
Prop Component: Procedural Components, Damage System, Gib Spawning, and DamageInfo Patterns
Prop Component: Procedural Physics, Gibs, Damage, and Network Patterns The component is a high-level s&box component that automatically creates , , and componen…
NetList and NetDictionary: Delta Sync, OnChanged Callbacks, Write Guard, and CanWriteChanges
NetList and NetDictionary: Networked Collections with Delta Sync and are s&box networked collection types for use with . They only send changes (deltas) over th…
s&box Source Generator: IUpdateSubscriber, WrappedPropertySet, and How [Sync]/[Rpc.*] Work at Compile Time
s&box Source Generator: How [CodeGenerator] Works for [Sync] and [Rpc.*] The Roslyn source generator transforms your C# code at compile time. Understanding this…