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…
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…
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…
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…
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…
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-…
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…
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…
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 …
NavMesh Areas — blocking and cost-modifying regions for AI pathfinding
NavMesh Areas components modify NavMesh generation and agent pathfinding costs within a defined region. Use them to create no-go zones, water areas, or danger z…
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…
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…
Network Ownership System
Network Ownership System Control who simulates and updates networked GameObjects with the ownership system. Ownership Basics Every networked object has an Owner…
Clutter System — scattering grass, rocks, and debris with GPU instancing
Clutter System — Scattering Grass, Rocks, and Debris The Clutter System scatters large amounts of small objects (grass, rocks, debris) across a scene using GPU-…
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.…
Terrain System
Terrain System Create expansive outdoor environments with real-time terrain editing, heightmap import, and multi-layer materials. Features Creating Terrain Add …
Terrain System — heightmap creation, material painting, and sculpting
Terrain System s&box terrain is a heightmap-based landscape system with material painting, sculpting tools, and built-in LOD. Terrain data is stored in a reusab…
Particle Effects System
Particle Effects System CPU-simulated, fully controllable particle system for effects like fire, smoke, sparks, and explosions. Architecture The particle system…
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…