ToolMode SelectionPoint and Trace Helpers
ToolMode.SelectionPoint and Trace Helpers Helper methods and data structures for toolgun selection and placement. SelectionPoint Struct Trace Methods Placement …
Explore the Engine - s&box Documentation
Explore the Engine Learn how s&box works by exploring the testbed and understanding the core concepts. Play Testbed Start s&box (not the editor) and find the ga…
Mapping - s&box Editor Documentation
Mapping s&box includes Hammer, the Source 2 level editor, for creating maps and environments. Build worlds with brushes, props, lighting, and gameplay entities.…
GameObjectFlags: DontDestroyOnLoad, NotNetworked, Absolute, and Destroy vs DestroyImmediate
GameObjectFlags: Controlling GameObject Behavior is a flags enum that controls special behaviors for GameObjects. Values Usage ```csharp // Survive scene loads …
TraceAttackInfo record struct
TraceAttackInfo Record Struct Information about a trace-based attack in s&box, used to pass attack data through the weapon system. Properties Target () - The Ga…
ControlSystem: Vehicle seat control with IPlayerControllable
ControlSystem: Vehicle Seat Control with IPlayerControllable This example shows the ControlSystem which manages vehicle seat control, sorting seats by occupatio…
DamageInfo: The Standard Damage Payload — Properties, Usage, and Custom Types
DamageInfo: The Standard Damage Payload is a class (not a struct) used to pass damage information between game systems. It is intentionally a class so games can…
Scene Tick Order: Full Frame Pipeline — FixedUpdate, Update, PreRender, ProcessDeletes, and Stage Hooks
Scene Tick Order: The Full Frame Pipeline Understanding the exact order of operations in a scene tick is critical for writing correct game logic. Game Tick Orde…
Sandbox: BaseConstraintToolMode — two-stage constraint creation with IToolActionEvents
BaseConstraintToolMode — Two-Stage Constraint Creation Pattern is the base for all two-point constraint tools (Weld, Rope, BallSocket, Elastic, Hydraulic, NoCol…
GameObjectSystem — scene-wide systems with stage-ordered execution and static access
GameObjectSystem — Scene-Wide Systems is a base class for scene-level systems that need to run at specific points in the frame — before or after physics, render…
s&box Game Static Class: Core Game State and Operations
s&box Game Static Class: Core Game State and Operations The static class provides global access to core game state, utilities, and operations. Scene Management …
Engine Frame Loop Order: FrameStart, Scene Tick, and FrameEnd Sequence
Engine Frame Loop Order The s&box engine frame loop runs in a specific order each frame. Understanding this is important for knowing when your code runs relativ…
Scene setup checklist — minimum viable scene with lighting, post-processing, and physics
Scene Setup Checklist for New Projects A quick reference for the components every new s&box scene typically needs. Minimum Viable Scene Lighting Post-Processing…
ControlSystem Pattern for Seat/Vehicle Control
ControlSystem - Seat/Vehicle Control Management A that manages control transfer between players and seated entities (vehicles, chairs). Handles input routing an…
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…
Network Events - s&box Networking Documentation
Network Events Network events allow you to broadcast and listen for events across the network. Unlike RPCs which target specific objects, network events are glo…
NavMesh Agent - s&box Gameplay Documentation
NavMesh Agent The NavMeshAgent component provides automatic navigation along the NavMesh. It handles pathfinding, obstacle avoidance, and smooth movement to tar…
BasePickup with ITriggerListener and ICollisionListener
BasePickup Abstract Class Abstract base for item pickups using trigger and collision detection with host-only consumption. Key Patterns **** — trigger volume pi…
Connection Permissions - s&box Networking Documentation
Connection Permissions Connection permissions control what clients can do in your multiplayer game. Set permissions for spawning objects, using tools, or perfor…
Custom Editors - s&box Editor Documentation
Custom Editors Custom editors let you create specialized inspector interfaces for your components and assets. Build custom widgets, property drawers, and full i…