Code Generation - s&box Documentation
Official s&box documentation for Code Generation - compile-time code generation. Code Generation covers the source generator system in s&box. The generator crea…
Binary Serialization - s&box Documentation
Official s&box documentation for Binary Serialization - efficient data storage. Binary Serialization saves data in compact binary format. The system handles ver…
Component Events - s&box Scene Documentation
Component Events Components can broadcast and listen for events. This provides a decoupled way for components to communicate without direct references. Event In…
Sandbox: CleanupSystem — full scene cleanup and per-player cleanup with Ownable
Sandbox CleanupSystem — Scene Cleanup and Per-Player Cleanup is a that handles cleaning up spawned objects. It distinguishes between "baseline" objects (part of…
s&box Component Lifecycle: Exact Execution Order and Internal Guards
s&box Component Lifecycle: Exact Execution Order and Internal Guards Derived directly from and in the s&box engine source. Execution Order **** — Called once wh…
Clothing - s&box Assets Documentation
Clothing The clothing system allows players to customize their Citizen character with various wearable items. Create hats, shirts, pants, accessories, and more.…
LocalData static class: Server-side data persistence
LocalData Static Class API Reference LocalData provides server-side data persistence that survives server restarts. It's useful for storing configuration, ban l…
Sandbox: Map entities — Door, Button, FuncMover, TriggerPush, TriggerTeleport
Sandbox Map Entities — Door, Button, FuncMover, TriggerPush, TriggerTeleport These components implement interactive map elements. They live in the namespace and…
Mapping - s&box Editor Documentation
Mapping s&box includes Hammer, the Source 2 level editor, for creating maps and environments. Build worlds with brushes, props, lighting, and gameplay entities.…
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…
Sandbox: BanSystem — persistent ban list with INetworkListener.AcceptConnection
Sandbox BanSystem — Persistent Ban List with INetworkListener is a that implements to intercept incoming connections and reject banned players before they join.…
Reporting Errors - s&box Documentation
Reporting Errors How to report bugs and issues with s&box. Issue Tracker Report bugs on the s&box issue tracker: Search existing issues first Create a new issue…
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…
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…
Player Controller - s&box Scene Documentation
Player Controller The Player Controller component provides character movement for games. It handles physics-based movement, ground detection, jumping, and camer…
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 …
Styling Panels - s&box UI Documentation
Styling Panels Style your UI panels using SCSS-like stylesheets or direct code styling. Using Stylesheets Create files alongside your files: Or specify a differ…
Texture Generators - s&box Editor Documentation
Texture Generators Create procedural textures in code. Generate textures from shapes, gradients, text, or any algorithm. Creating a Generator Inherit from : Pro…
GameObjectSystem — scene-wide systems with stage-ordered execution and static access
GameObjectSystem — Scene-Wide Systems is a base class for scene-level systems that need to run at specific points in the frame — before or after physics, render…
GameResource Extensions - s&box Assets Documentation
GameResource Extensions Extend GameResource types with additional data. Create extensions that attach to existing resources like models or sounds. Creating a Re…