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…
s&box GamePreferences: User preferences
GamePreferences Static Class GamePreferences is a static class that defines the local user's preferences for the game. These ConVars control player-specific set…
Throwable enum
Throwable Enum Types of throwable weapons for s&box viewmodel animation selection. Values HEGrenade - High-explosive grenade SmokeGrenade - Smoke grenade StunGr…
Performance Best Practices
s&box Performance Best Practices Community guide for writing performant s&box code based on engine behavior and developer recommendations. Object Pooling Avoid …
Debugging and Profiling Tips
Debugging and Profiling Tips Community guide for debugging s&box games based on official tools and developer recommendations. Console Commands Useful built-in c…
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: BaseBulletWeapon — hitscan shooting with BulletConfiguration, recoil, and IronSightsWeapon
BaseBulletWeapon — Hitscan Shooting with Recoil and Camera Noise extends and implements hitscan bullet firing with configurable aim cone, recoil, and camera noi…
Sandbox: ControlSystem — vehicle seat and contraption control with IPlayerControllable
ControlSystem — Vehicle Seat and Contraption Control is a that drives components on contraptions. When a player sits in a , the system walks the connected contr…
Beams - s&box Rendering Documentation
Beams Beam effects create animated lines between points - useful for lasers, lightning, energy beams, and trails. BeamEffect Component Create beams using the Be…
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…
BulletConfiguration record struct
BulletConfiguration Record Struct Configuration for s&box bullet weapon behavior including damage, spread, and recoil. Properties Damage () - Base damage per bu…
s&box BasePickup: Trigger and collision-based pickup system
BasePickup API Reference BasePickup is an abstract Component for creating trigger or collision-based pickups (weapons, ammo, items). Type Signature Required Com…
s&box BaseCarryable.IEvent: World model events
BaseCarryable.IEvent Interface API Reference BaseCarryable.IEvent is an interface for receiving world model lifecycle events on carryable objects (weapons, item…
s&box AmmoInventory: Shared ammo pools
AmmoInventory Component API Reference AmmoInventory stores shared ammo pools on a player, keyed by AmmoResource. Add this component to the player prefab alongsi…
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…
BaseCarryable.IEvent interface
BaseCarryable.IEvent Interface Scene event interface for world model lifecycle events on s&box carryable items. Methods OnCreateWorldModel Called when the world…
Multiplayer Authority Patterns
Multiplayer Authority Patterns Community guide for structuring multiplayer code based on official networking documentation and proven patterns. Host-Authoritati…
Input Handling Code Examples
Input Handling Code Examples Comprehensive input examples covering buttons, analog sticks, mouse, controller, and VR input. Default Input Actions
s&box Vector3 extension for aim cone randomization
s&box Vector3 Extension for Aim Cone Randomization This example shows extension methods for adding random spread to Vector3 direction vectors using s&box's Game…
Prefab Spawning and Cloning
Prefab Spawning and Cloning Prefabs are reusable GameObject templates that can be instantiated at runtime. Creating Prefabs Create a GameObject in the scene wit…