auto_stories

s&box MCP Knowledgebase

Documentation, API references, code examples and community knowledge for s&box development.

library_books 595 entries menu_book 352 Documentation code 133 API Reference terminal 100 Code Example groups 10 Community
Results for "ui" 143 results closeClear
terminalCode Example
May 11, 2026

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…

terminalCode Example
May 5, 2026

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…

menu_bookDocumentation
May 12, 2026

s&box HUD: UI scale factor

HUD Static Class HUD is an internal static class that provides a scale factor for UI elements based on screen resolution. It ensures UI elements scale proportio…

terminalCode Example
May 12, 2026

Slot-based inventory UI with BuildHash optimization

Slot-Based Inventory UI with BuildHash Optimization This example shows a slot-based inventory UI with BuildHash() optimization to prevent unnecessary rebuilds a…

terminalCode Example
May 3, 2026

Chat UI Pattern with RPC Broadcasting

Chat UI with RPC Broadcasting A Razor UI component for game chat that handles local input, RPC broadcasting, Steam filtering, and automatic message expiration. …

groupsCommunity
May 5, 2026

s&box built-in component quick reference — rendering, physics, navigation, UI, and audio

s&box Component Quick Reference A cheat sheet of the most commonly used built-in components and what they do. Rendering Lighting Physics Navigation UI Audio Gam…

menu_bookDocumentation
May 4, 2026

ScreenPanel and WorldPanel: AutoScale Strategies, ZIndex, LookAtCamera, and Interaction Range

ScreenPanel and WorldPanel: UI Components in s&box Scenes ScreenPanel is the root component for 2D screen-space UI. It renders attached children to the screen. …

menu_bookDocumentation
May 20, 2026

Platform Chat - Built-in Multiplayer Text Chat System

Built-in text chat for multiplayer games. Messages are routed through the host, validated, filtered, and displayed via the standard overlay UI - no game code re…

menu_bookDocumentation
May 4, 2026

Sound.Play and SoundHandle: 3D Audio, Volume, Pitch, Occlusion, UI Sounds, and Dedicated Server Behavior

Sound.Play and SoundHandle: Audio Playback in s&box is the static entry point for audio playback. is the returned handle for controlling a playing sound. Playin…

terminalCode Example
May 10, 2026

Reusable World-Space Interaction Prompt Framework

A small, compartmentalized interaction framework can be built from three pieces: : the base component placed on objects the player can use. : the player-side ra…

menu_bookDocumentation
May 5, 2026

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…

terminalCode Example
May 5, 2026

VirtualGrid — efficiently rendering large scrollable lists in s&box UI

VirtualGrid — Efficiently Rendering Large Lists in UI is a s&box UI panel that virtualizes a large collection — only the visible cells are created in the DOM. S…

menu_bookDocumentation
May 20, 2026

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 …

menu_bookDocumentation
May 4, 2026

SceneCamera: World-to-Screen, Screen-to-World, Render Hooks, and Camera Properties

SceneCamera: World-to-Screen, Screen-to-World, and Render Hooks is the main camera class in s&box. It wraps a native frustum and provides coordinate conversion,…

menu_bookDocumentation
May 20, 2026

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…

codeAPI Reference
May 3, 2026

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…

menu_bookDocumentation
May 5, 2026

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…

menu_bookDocumentation
May 5, 2026

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…

menu_bookDocumentation
May 4, 2026

s&box Easing Functions: Sandbox.Utility.Easing — Quadratic, Exponential, Bounce, Sine, and CSS-Style Name Lookup

s&box Easing Functions: Sandbox.Utility.Easing for Transitions and Animations provides standard easing functions used throughout s&box's UI system and available…

menu_bookDocumentation
May 3, 2026

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…