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 "if ( go.IsValid() )" 12 results closeClear
terminalCode Example
May 3, 2026

CleanupSystem Pattern for Map Reset and Scene Management

CleanupSystem - Scene State Management and Map Cleanup A that captures the baseline scene state and allows resetting the map to its original state. Removes spaw…

terminalCode Example
May 12, 2026

CleanupSystem: Map reset and baseline restoration

CleanupSystem: Map Reset and Baseline Restoration This example shows the CleanupSystem which tracks the baseline scene state and allows resetting the map to its…

terminalCode Example
May 4, 2026

Sandbox: BaseCarryable — unified AimRay, WeaponModel resolution, and seat-aware damage

BaseCarryable — Unified Weapon Base with AimRay and Seat Support is the root class for all holdable items. It handles viewmodel/worldmodel management, a unified…

terminalCode Example
May 3, 2026

DynamiteEntity Explosive Entity Pattern

DynamiteEntity - Simple Explosive Entity A simple explosive entity that can be triggered via damage or player input. Demonstrates , , and prefab cloning pattern…

menu_bookDocumentation
May 3, 2026

s&box Cheat Sheet

s&box Cheat Sheet Quick reference for common s&box operations. Debugging Transforms GameObjects Components Input Networking

codeAPI Reference
May 3, 2026

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…

terminalCode Example
May 3, 2026

BaseWeapon and BaseCarryable Weapon Framework

BaseWeapon and BaseCarryable - Weapon Framework Base classes for creating weapons in s&box. Provides ammo management, view/world models, and input handling. Bas…

menu_bookDocumentation
May 5, 2026

GameObject - s&box Documentation

GameObject A GameObject is the fundamental building block of scenes in s&box. GameObjects have a transform (position, rotation, scale), can have parents and chi…

terminalCode Example
May 12, 2026

GameObject.FindNetworkRoot() extension method

GameObject.FindNetworkRoot() Extension Method This example shows an extension method for finding the network root of a GameObject hierarchy. Usage Example Key F…

terminalCode Example
May 12, 2026

UndoSystem: Per-player undo functionality

UndoSystem: Per-Player Undo Functionality This example shows the UndoSystem which provides per-player undo stacks for tracking spawned objects and allowing play…

terminalCode Example
May 20, 2026

Code Cheat Sheet: Quick Reference for GameObjects, Components, and Transforms

Quick reference for common s&box operations covering debugging, transforms, GameObjects, and Components. Useful when you know what you want to do but not the ex…

menu_bookDocumentation
May 20, 2026

Cheat Sheet: Quick Reference for s&box GameObjects, Components, and Debugging

Quick reference for common s&box operations across debugging, transforms, GameObjects, and Components. Debugging Transforms GameObjects Components