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 "spawning" 125 results closeClear
menu_bookDocumentation
May 20, 2026

Prefabs: Reusable GameObjects with Runtime Spawning via Clone

A prefab is a GameObject that can be used in multiple places — across scenes or instantiated at runtime. Assets Prefabs are saved as PrefabFile assets. To creat…

menu_bookDocumentation
May 20, 2026

Decal Component: Projected Surface Effects with Random Variety

The s&box Decal component draws decals in the game world. It supports multiple DecalDefinitions for random variety without extra code. Setup Add a Decal compone…

menu_bookDocumentation
May 20, 2026

TemporaryEffect: Auto-Cleanup for Particle and Sound Prefabs

The TemporaryEffect component in s&box is added to prefabs containing ParticleEffects and Sounds. It automatically deletes the GameObject after all particles ar…

menu_bookDocumentation
May 20, 2026

Network Events: INetworkListener for Player Join, Leave, and Active Callbacks

Implement or on a component to react to players joining and leaving the game. INetworkListener Example Spawn a player object when someone joins: INetworkListene…

menu_bookDocumentation
May 5, 2026

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…

menu_bookDocumentation
May 3, 2026

Network Ownership System

Network Ownership System Control who simulates and updates networked GameObjects with the ownership system. Ownership Basics Every networked object has an Owner…

codeAPI Reference
May 12, 2026

s&box Ownable: Ownership tracking component

Ownable Component API Reference Ownable is a Component that tracks which Connection (player) spawned a GameObject, enabling prop protection and ownership checks…

terminalCode Example
May 4, 2026

Sandbox: Stacker tool — duplicate objects in a line or arc with StackAlignMode

Stacker Tool — Duplicate Objects in a Line or Arc The Stacker tool clones a selected object N times along a configurable axis with optional rotation and gap. It…

menu_bookDocumentation
May 5, 2026

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.…

codeAPI Reference
May 12, 2026

s&box ICleanupEvents: Cleanup event callbacks

ICleanupEvents API Reference ICleanupEvents is an interface for receiving callbacks when the scene is cleaned up (map reset). Type Signature Method - Called aft…

menu_bookDocumentation
May 3, 2026

Mapping in s&box

Mapping in s&box s&box includes Hammer, the Source 2 level editor, for creating maps. Opening Hammer Main Menu → Tools → Hammer Or click Hammer icon in toolbar …

menu_bookDocumentation
May 5, 2026

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…

menu_bookDocumentation
May 5, 2026

Ownership - s&box Networking Documentation

Ownership Network ownership determines which client or the host has authority over a networked GameObject. The owner controls synced properties and can send RPC…

menu_bookDocumentation
May 3, 2026

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…

codeAPI Reference
May 12, 2026

s&box MountMetadata: Mount fallback rendering

MountMetadata Component API Reference MountMetadata is attached to mount-spawned props to show a graceful bounding box and hint the player which game it's from …

menu_bookDocumentation
May 20, 2026

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…

menu_bookDocumentation
May 12, 2026

BuildHash pattern for Razor panel optimization

BuildHash Pattern for Razor Panel Optimization BuildHash is a method you can override in Razor panels to prevent unnecessary rebuilds when the underlying state …

menu_bookDocumentation
May 5, 2026

GameObjectSystem - s&box Scene Documentation

GameObjectSystem GameObjectSystems are global systems that operate on groups of GameObjects. Unlike Components which are attached to single GameObjects, systems…

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

terminalCode Example
May 3, 2026

Rigidbody Physics

The component enables physics simulation on GameObjects. Basic Usage Rigidbody Properties Forces Collision Detection Wake/Sleep Spawn with Velocity