ActionGraph Component Actions - s&box Documentation
ActionGraph Component Actions Add ActionGraph behavior directly to GameObjects using the ActionGraph component. Component Actions The ActionGraph component lets…
Your First Project - s&box Documentation
Your First Project Creating Game Objects In s&box, everything in your scene is a GameObject. GameObjects can have Components attached to them that provide funct…
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 …
Engine Frame Loop Order: FrameStart, Scene Tick, and FrameEnd Sequence
Engine Frame Loop Order The s&box engine frame loop runs in a specific order each frame. Understanding this is important for knowing when your code runs relativ…
Sandbox: SaveSystem — scene diff save/load with versioning and ISaveEvents
Sandbox SaveSystem — Scene Diff Save/Load The captures the difference between the current scene state and the original scene file. This means saves are compact …
Inventory Hotbar UI Component
Inventory HUD with Hotbar A Razor PanelComponent that displays player inventory slots as a hotbar with mouse wheel and number key support. Implementation Key Fe…
Animation - s&box Documentation
Animation s&box supports skeletal animation for characters and objects. Animate models using imported animations, blend between states, and control playback fro…
ScenePhysicsSystem: Physics Sub-Stepping at 120Hz, Collision Event Routing, Keyframe Colliders, and Editor Physics
ScenePhysicsSystem: How Physics Steps Work in s&box is the built-in that drives physics simulation. Understanding it explains the physics step order and collisi…
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…
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…
VerletRope — rope physics with attachment, slack, and stiffness
VerletRope simulates rope physics using Verlet integration. The rope hangs from the GameObject's position and optionally attaches its end to another GameObject.…
Post-processing and camera setup — CameraComponent, PostProcessVolume, Bloom, DoF, and Film Grain
Post-Processing and Camera Setup CameraComponent Orthographic Camera Multiple Cameras (Priority) Higher priority renders on top. Use for split-screen, minimaps,…
Sandbox.ParticleEffect
Sandbox.ParticleEffect Controls particle system playback. Overview ParticleEffect is the root component for playing particle effects (.vpcf files). Setup Playba…
s&box LineDefinition: Trail line resource
LineDefinition GameResource API Reference LineDefinition is a GameResource for trail line definitions used by the Trail tool. It implements IDefinitionResource …
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…
Leaderboards API
Implement leaderboards using s&box Services API. Submitting Scores Reading Leaderboards Leaderboard Entry Properties Web API Access Query leaderboards from exte…
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…
Noclip MoveMode with Collision Toggle
Noclip MoveMode Implementation Custom movement mode for noclip/fly behavior with collision toggle. Key Patterns MoveMode inheritance — override , , priority — 1…
Stats API
Track player statistics with the Stats service. Recording Stats Reading Stats Stat Types Batching Stats are automatically batched and sent periodically. Call as…
s&box SoundHandle: Full Audio Playback Control API
s&box SoundHandle: Full Audio Playback Control API is returned by and gives full control over a playing sound. Playing Sounds SoundHandle Properties Stopping St…