Scene Metadata - s&box Scene Documentation
Scene Metadata You can implement the interface in any Component that has data you'd like saved to Metadata. Metadata is data that can be accessed without needin…
Project Structure Recommendations
Project Structure Recommendations Community guide for organizing s&box projects based on Facepunch examples and successful community projects. Recommended Folde…
s&box ISpawnerExtensions: Creating spawner instances
ISpawnerExtensions: Creating ISpawner Instances ISpawnerExtensions provides an extension method to create ISpawner instances from type strings, supporting vario…
Sandbox.Log
Sandbox.Log Static logging class for console output. Overview Log messages appear in the editor console, in-game console (press ), and log files. Logging Method…
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…
Sandbox.ParticleEffect
Sandbox.ParticleEffect Controls particle system playback. Overview ParticleEffect is the root component for playing particle effects (.vpcf files). Setup Playba…
Video - s&box Media Documentation
Video s&box can decode and play video files for cutscenes, UI elements, or in-world displays. VideoPlayer The VideoPlayer decodes video and exposes frames as a …
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…
Storage UGC - s&box Assets Documentation
Storage UGC The Storage system manages user-generated content. Save games, player creations, and share to Steam Workshop. Creating a New Entry Create a storage …
ISceneLoadingEvents: Async Scene Load Hooks with BeforeLoad, OnLoad, and AfterLoad
ISceneLoadingEvents: Async Scene Load Hooks Implement on a to hook into the scene loading pipeline. The game waits for async tasks to complete before proceeding…
EmitMode enum
EmitMode Enum Controls how an emitter triggers when controlled via player input in s&box. Values Toggle Press once to turn on, press again to turn off. Hold Emi…
Throwable enum
Throwable Enum Types of throwable weapons for s&box viewmodel animation selection. Values HEGrenade - High-explosive grenade SmokeGrenade - Smoke grenade StunGr…
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…
BulletConfiguration record struct
BulletConfiguration Record Struct Configuration for s&box bullet weapon behavior including damage, spread, and recoil. Properties Damage () - Base damage per bu…
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…
Scene.Load and Scene.LoadFromFile: Loading Scenes, DontDestroyOnLoad, and the Loading Sequence
Scene.Load and Scene.LoadFromFile: Loading Scenes Locally loads a scene file into the current scene. This is a local-only operation — it does not bring other cl…
ISceneStartup: OnHostPreInitialize, OnHostInitialize, OnClientInitialize — Scene Initialization Hooks
ISceneStartup: Scene Initialization Hooks for GameObjectSystems provides callbacks for scene initialization events. It is intended for implementations, not comp…
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…
Making a Hat - s&box Clothing Documentation
Making a Hat Step-by-step guide to creating hat clothing for the Citizen character. Making Hats / Headwear Hats are worn on the head and don't need to deform wi…
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 …