s&box EntitySpawnerEntity: Entity spawner
EntitySpawnerEntity Component API Reference EntitySpawnerEntity is a world-placed SENT that spawns another SENT at its location. Can be triggered manually via p…
[Sync] Attribute: SyncFlags.FromHost, SyncFlags.Interpolate, SyncFlags.Query — How Property Sync Works
[Sync] Attribute: SyncFlags and How Property Synchronization Works The attribute marks a component property for automatic network synchronization from the owner…
s&box SpeechLayer: NPC speech and subtitles
NPC behavior layer that manages speech state, plays sound files, and renders subtitle text above the NPC's head. Properties Methods Behavior Resolves a random s…
BasePostProcess: Custom Post-Processing with GetWeighted, BlitMode, and PostProcessVolume Blending
BasePostProcess<T>: Custom Post-Processing Effects with Volume Blending is the current (non-obsolete) base class for post-processing effects in s&box. It replac…
Sandbox.Ray
Sandbox.Ray Infinite ray for intersection tests. Overview Ray represents an infinite line starting from a point and extending in a direction. Used for raycastin…
s&box SensesLayer: NPC environmental scanning
NPC behavior layer that handles awareness and environmental scanning. Caches visible/audible objects by tag for efficient querying. Properties Methods Behavior …
Custom Particle Controller: Code-Based Particle Simulation with Threading
The s&box particle system allows custom code-based particle controllers by inheriting from . Add the component to a GameObject with a ParticleEffect to control …
RadiusDamage — explosion area damage with IDamageable, occlusion, and physics force
RadiusDamage Component is a built-in s&box component that applies damage to all objects within a sphere. It integrates with the system and can apply outward phy…
Input Handling Code Examples
Input Handling Code Examples Comprehensive input examples covering buttons, analog sticks, mouse, controller, and VR input. Default Input Actions
Scene Metadata - s&box Scene Documentation
Scene Metadata You can implement the interface in any Component that has data you'd like saved to Metadata. Metadata is data that can be accessed without needin…
Inspector Attributes: Group, Title, Icon, Range, InfoBox, Feature, and More
Inspector Attributes: Controlling How Properties Appear in the Editor s&box provides a rich set of attributes to control how component properties appear in the …
s&box LineDefinition: Trail line resource
LineDefinition GameResource API Reference LineDefinition is a GameResource for trail line definitions used by the Trail tool. It implements IDefinitionResource …
ConVar and ConCmd: Console Variables and Commands in s&box
ConVar and ConCmd: Console Variables and Commands s&box uses and attributes on static properties and methods to expose them to the console system. ConVar (Conso…
CharacterController — capsule movement, ground checks, and velocity control
CharacterController in s&box is a built-in s&box component for capsule-based movement. Unlike , you control velocity directly — the controller handles collision…
IPlayerControllable example: ThrusterEntity
IPlayerControllable Example: ThrusterEntity ThrusterEntity demonstrates how to implement IPlayerControllable for a thruster that responds to player input while …
Player Component with Static Accessors
Player Component Main player component that manages health, damage, camera, and interfaces with the inventory system. Static Accessors Key Properties HUD Visibi…
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…
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 Vector3 extension for aim cone randomization
s&box Vector3 Extension for Aim Cone Randomization This example shows extension methods for adding random spread to Vector3 direction vectors using s&box's Game…
Sandbox: Physgun — grab, freeze, launch, and pull mechanics
Physgun — Grab, Freeze, Launch, and Pull Mechanics The Physgun () is a that lets players grab, move, freeze, and launch physics objects. It uses a struct to tra…