Component Lifecycle: Full Callback Order — OnAwake, OnEnabled, OnStart, OnUpdate, OnFixedUpdate, OnDisabled, OnDestroy
Component Lifecycle: Full Callback Order s&box components have a well-defined lifecycle. Understanding the exact order prevents subtle bugs. Callback Order Key …
s&box Component Lifecycle: Exact Execution Order and Internal Guards
s&box Component Lifecycle: Exact Execution Order and Internal Guards Derived directly from and in the s&box engine source. Execution Order **** — Called once wh…
Editor Tools
Editor Tools Create custom tools for the s&box editor. Creating a Tool Scene Access Gizmo Drawing Preventing Selection Overlay UI Editor Project Setup Tools mus…
Component execution order — OnAwake, OnStart, OnUpdate, OnFixedUpdate, and OnLateUpdate
Component Execution Order s&box calls component lifecycle methods in a defined order each frame. Understanding this order is essential for avoiding race conditi…
s&box PhysicalProperties: Physical property persistence
PhysicalProperties Component API Reference PhysicalProperties is a Component that persists physical properties (mass, gravity, health) across duplication and ne…
Component Interfaces: ExecuteInEditor, ICollisionListener, IDamageable in s&box
s&box provides several Component interfaces for specific purposes: editor execution, collision handling, triggers, damage, and networking. ExecuteInEditor Compo…
Randomized Clothing for NPC Citizens using Dresser.Randomize() on Prefabs
Overview This demonstrates how to create NPC citizen prefabs with randomized clothing using the built-in component. Each time the prefab spawns or is enabled, i…
Scene.Push(), BatchGroup(), FindInPhysics, and FindAllWithTag — Scene Context Management
Scene.Push() and Scene.BatchGroup(): Scene Context Management Scene.Push() makes a scene the active scene for the duration of a scope. This is required when cre…
Custom editor tools — EditorTool, Gizmo drawing, scene tracing, and overlay UI
Custom Editor Tools Editor tools appear in the s&box toolbar and let you build scene editing workflows — painting, placement, custom gizmos. They must live in a…
Sandbox: BaseWeapon — ammo system, reload, shoot delay, and IPlayerControllable
BaseWeapon — Ammo, Reloading, and Firing Pattern extends and adds ammo management, reloading, and a shoot delay system. It implements so it can also be used fro…
Collision and Triggers
Working with physics collisions and trigger volumes. Collision Components Basic Collision Trigger Volumes Triggers detect overlap without blocking movement: Col…
ToolMode Base Class for Toolgun Modes
ToolMode Base Class Abstract base class for creating toolgun modes in s&box. Handles input registration, action dispatch, and HUD rendering. Class Overview Acti…
Execution Order - s&box Documentation
Execution Order Understanding the order in which component methods are called. Flowchart Component lifecycle follows a specific order: Constructor — Object crea…
WebSockets - s&box Networking Documentation
WebSockets s&box supports WebSocket connections for real-time communication with external servers. Use for custom networking, persistent data, or integrating wi…
Async tasks in s&box — coroutines, parallel tasks, and frame-by-frame animation
Async Tasks in s&box Components s&box async tasks run on the main thread — they behave like coroutines. Use to yield one frame, to wait, and to run tasks in par…
Nameplate Component with Voice Activity
Nameplate with Voice Activity A Razor component that displays player nameplates above characters with voice chat visualization. Implementation SCSS Example Key …
Async Components: Coroutine-Style Async Tasks on the Main Thread
Async tasks in s&box run on the main thread by default, operating like coroutines. They are the recommended replacement for coroutines in s&box. Basic Async Fra…
Component Lifecycle Methods Reference
Component Lifecycle Methods s&box Components have a well-defined lifecycle with specific methods you can override for different phases of initialization and upd…
ISceneStartup: OnHostPreInitialize, OnHostInitialize, OnClientInitialize — Scene Initialization Hooks
ISceneStartup: Scene Initialization Hooks for GameObjectSystems provides callbacks for scene initialization events. It is intended for implementations, not comp…
Editor - s&box Documentation
Editor The s&box Editor provides a modern interface for building games. Features Asset Previews - Thumbnails for models, materials, textures Custom Editors - Sp…