UIDecal Component - Render Razor UI as a Decal
A Render Component for s&box that allows you to project Razor UI onto surfaces as a Decal. Great for sticking UI onto rounded walls, curved surfaces, or any geo…
Razor Panel Structure and Syntax
Razor Panel Structure s&box uses Razor syntax for UI panels with files and optional stylesheets. Basic Panel Component File Structure The Element The element is…
Sandbox.UI.Panel
Sandbox.UI.Panel Base class for UI panels. Overview Panel is the base class for all UI in s&box. Create panels using Razor (.razor) files or dynamically in code…
Razor Panels: HTML/CSS UI with C# in s&box
s&box UI can be created using Razor syntax — web-like HTML/CSS combined with C#. Panels are not rendered via a HTML renderer; the syntax is a convenience layer …
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 …
s&box context menu with submenus and auto-positioning
s&box Context Menu with Submenus and Auto-Positioning This example shows a context menu system using s&box's Panel, Screen, and layout system with submenu build…
Razor Panels: HTML/CSS UI with C# in s&box PanelComponent System
s&box Razor Panels use web-like HTML/CSS syntax with C# for UI creation. Panels are rendered natively (not via HTML renderer) — the syntax is a convenience laye…
s&box IInspectorEditor: Custom inspector panels
IInspectorEditor Interface API Reference IInspectorEditor is an interface for custom inspector panels that can edit selected GameObjects in the s&box editor. Pa…
s&box InspectorEditorAttribute: Registering inspector editors
InspectorEditorAttribute API Reference InspectorEditorAttribute is used to register a panel implementing IInspectorEditor with the inspector system. Type Signat…
WorldPanel and ScreenPanel — HUD overlays and 3D world-space UI with Razor PanelComponent
WorldPanel and ScreenPanel — UI in the World s&box UI uses (Razor) attached to either a (HUD overlay) or (3D world-space UI). The same component works with both…
Razor Panels - s&box Documentation
Official s&box documentation for Razor Panels - the UI layout system. Razor Panels use a familiar HTML-like syntax with C# code-behind for building game interfa…
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…
Editor Widgets
Editor Widgets Build custom editor UI using Widgets (different from in-game Panels). Creating a Widget Widget as Window Widget as Child Dockable Widget Asset Ed…
Styling Panels: SCSS, Inline Styles, and Code-Based Styling
s&box panels can be styled using SCSS stylesheets, inline styles, style blocks, or direct code manipulation. The styling system uses CSS-like syntax but is rend…
Razor Components: Reusable UI Fragments with RenderFragment and Generics
Razor Components in s&box allow you to define reusable UI content that can be used inside other razor files. They make panels more agile and composable. Creatin…
VirtualGrid: Virtualized Grid Panel for Large Item Collections
is a s&box UI Panel that virtualizes large item collections — only rendering visible cells. If you have thousands of items, it creates only the few on screen an…
HudPainter: Immediate-Mode HUD Drawing in s&box
Each has a property (HudPainter) for immediate-mode drawing onto the screen. More efficient than UI panels since there's no layout, stylesheets, or interactivit…
Drag-and-drop system with static instance pattern
Drag-and-Drop System with Static Instance Pattern This example shows a drag-and-drop system using a static instance pattern for global state management and visu…
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 …
Input - s&box Gameplay Documentation
Input s&box provides a comprehensive input system that handles keyboard, mouse, and gamepad input. The input system uses named actions defined in your project s…