s&box Hotload System: How Code Reloading Works, SkipHotload, ConVar Persistence, and NetworkObject.OnHotload
s&box Hotload System: How Code Reloading Works s&box supports live code reloading (hotload) without restarting the game. Understanding how it works helps avoid …
Collider Component: Triggers, Surface Properties, Keyframe Bodies, Concave Shapes, and Tag Propagation
Collider Component: Triggers, Surface Properties, and Keyframe Bodies The abstract base class is the foundation for all physics colliders in s&box (, , , , ). T…
Sandbox: ToolMode system — creating custom Tool Gun modes
ToolMode System — Creating Custom Tool Gun Modes is the base class for all Tool Gun tools in Sandbox. Tools are components on the Toolgun and are enabled/disabl…
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…
Game Resources - s&box Documentation
Official s&box documentation for Game Resources - custom asset types. GameResource allows defining custom asset types that can be created in the editor and load…
RPC Messages: Remote Procedure Calls with Broadcast, Owner, and Host Targets
Components can contain RPCs (Remote Procedure Calls). An RPC is a function that when called, is also called remotely on other clients. Broadcast RPC makes a fun…
RenderOptions: Game, Overlay, Bloom, AfterUI Render Layers — and Renderer.Attributes for Shader Parameters
RenderOptions: Render Layers for SceneObjects controls which render layers a component's appears in. It's exposed as a property on all subclasses. Render Layers…
TextRenderer: 3D World Text, TextScope, Localization via # Prefix, Scale vs FontSize, and JsonUpgrader Pattern
TextRenderer: 3D World Text with Localization Support renders text in 3D world space using for font configuration. Basic Usage TextScope The property controls a…
Custom Assets - s&box Documentation
Official s&box documentation for Custom Assets - user-defined resource types. Custom Assets allow defining new asset types for your game. GameResource is the ba…
s&box ServerSettings: Replicated server-controlled settings
ServerSettings API Reference ServerSettings is a static class for server-controlled settings that are replicated to all clients. Type Signature Example Property…
Hotloading - s&box Documentation
Hotloading Whenever you save a code file in your project (.cs or .razor files), we recompile and attempt to live-reload the changed assembly. This lets you quic…
RPC Messages - s&box Documentation
RPC Messages Components can contain RPCs. An RPC is a function that when called, is called remotely too. Supported RPC arguments are the exact same as Sync prop…
Sandbox.GameResource
Sandbox.GameResource Base class for custom asset types. Overview GameResource is the base class for creating custom asset types that appear in the editor with f…
s&box InspectorEditorAttribute: Registering inspector editors
InspectorEditorAttribute API Reference InspectorEditorAttribute is used to register a panel implementing IInspectorEditor with the inspector system. Type Signat…
s&box TVEntity: Camera feed display
TVEntity Component API Reference TVEntity is a TV screen entity that displays the feed from a linked CameraEntity. Use the Linker tool to connect a Camera to th…
s&box DupeCategory: Workshop duper categories
s&box DupeCategory Enum DupeCategory is an enum used to categorize workshop dupes for filtering and browsing. Each category has an associated icon for UI displa…
Sync Properties: Networked State with Change Detection and Collections
The attribute on a Component property sends its latest value to other players each time it changes. Only the owner of the object can change synced properties. B…
Custom GameResource Assets: Define, Create, and Access Custom Asset Types
Define custom asset types as subclasses. They get a nice inspector window, are hotloaded in-game, and are stored as JSON files with a custom extension. Creating…
s&box IDefinitionResource: Resource metadata interface
IDefinitionResource API Reference IDefinitionResource is an interface for game resources that have display metadata (title and description). Type Signature Prop…
Component Versioning: JsonUpgrader for Scene and Prefab Migration
s&box component versioning uses attributes and the property to migrate serialized scene/prefab data when you make breaking changes to component properties. This…