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 …
BuildHash pattern for Razor panel optimization
BuildHash Pattern for Razor Panel Optimization BuildHash is a method you can override in Razor panels to prevent unnecessary rebuilds when the underlying state …
ActionGraph - Visual Scripting System
ActionGraph - Visual Scripting System Create game logic using node-based visual scripting without writing code. Overview ActionGraph lets you: Build gameplay lo…
Common Pitfalls and How to Avoid Them
s&box Common Pitfalls and How to Avoid Them Community-compiled list of frequently encountered issues and their solutions, based on Discord support channels and …
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…
Shaders in s&box - HLSL and Shading Models
Shaders in s&box - HLSL and Shading Models Write custom shaders in HLSL with Source 2's shading models, render states, and GPU instancing support. Shader Develo…
VirtualGrid
VirtualGrid Efficient virtualized grid component for large lists in UI. When to Use Use when displaying: Large item lists (100s-1000s) Inventories with many slo…
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…
Scene Object Index: How Scene.GetAll Works — Type Hierarchy Indexing, Update Sets, and Hotload Safety
Scene Object Index: How Scene.GetAll<T> Works and Why It's Fast is the primary way to find all active components or systems of a type in the scene. Understandin…
s&box IToolActionEvents: Tool action callbacks
IToolActionEvents Interface API Reference IToolActionEvents allows listening to tool actions across the scene. Implement this on a Component to receive callback…
Decals in s&box
Decals in s&box Decals are textures projected onto surfaces for bullet holes, graffiti, scorch marks, etc. Decal Component Add to a GameObject: DecalDefinition …
Custom Particle Controller - s&box Documentation
Official s&box documentation for the Particle System - visual effects. Particle Effect creates GPU-accelerated visual effects. Custom Particle Controllers scrip…
Particle Effect - s&box Documentation
Official s&box documentation for Particle Effects - visual effects system. Particle Effect creates visual effects using GPU-accelerated particles. The system su…
Particle Effects System
Particle Effects System CPU-simulated, fully controllable particle system for effects like fire, smoke, sparks, and explosions. Architecture The particle system…
Connection Permissions - s&box Networking Documentation
Connection Permissions Connection permissions control what clients can do in your multiplayer game. Set permissions for spawning objects, using tools, or perfor…
Code Basics - s&box Documentation
Code Basics C# is the primary programming language for s&box. The engine uses modern .NET with hotloading support, allowing you to see code changes instantly wi…
s&box DamageInfo: Extensible Damage Data Class and IDamageable Interface
s&box DamageInfo: Extensible Damage Data Class is a class (not a struct) so it can be subclassed for game-specific damage types. Definition Usage IDamageable In…
Post Processing System
Post Processing System Add visual effects like bloom, tonemapping, and film grain with post-processing volumes. Overview Post processing in s&box uses a volume-…
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.…
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…