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 "logic" 53 results closeClear
menu_bookDocumentation
May 5, 2026

Player Controller - s&box Scene Documentation

Player Controller The Player Controller component provides character movement for games. It handles physics-based movement, ground detection, jumping, and camer…

menu_bookDocumentation
May 5, 2026

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…

menu_bookDocumentation
May 5, 2026

NetworkHelper — quick multiplayer setup with auto-server and player spawning

NetworkHelper — Quick Multiplayer Setup is a built-in s&box component that handles the boilerplate of starting a server and spawning players. It's the fastest w…

menu_bookDocumentation
May 4, 2026

ISceneLoadingEvents: Async Scene Load Hooks with BeforeLoad, OnLoad, and AfterLoad

ISceneLoadingEvents: Async Scene Load Hooks Implement on a to hook into the scene loading pipeline. The game waits for async tasks to complete before proceeding…

menu_bookDocumentation
May 4, 2026

MainThread.Queue: Running Code on the Main Thread from Worker Threads

MainThread.Queue: Running Code on the Main Thread from Worker Threads s&box is single-threaded for game logic. If you have code running on a worker thread (e.g.…

groupsCommunity
May 5, 2026

s&box networking gotchas — IsProxy, Sync, Authority, NetworkSpawn, and culling

s&box Networking Gotchas Common mistakes when building multiplayer games in s&box. IsProxy vs IsAuthority is true on all clients that don't own the object. Alwa…

terminalCode Example
May 5, 2026

Unit tests in s&box — MSTest setup, engine initialization, and component testing

Unit Tests in s&box s&box supports MSTest-based unit tests. Create a directory in your project folder and restart the editor — a test project is generated autom…

menu_bookDocumentation
May 5, 2026

ActionGraph — visual scripting with action nodes, delegates, and C# integration

ActionGraph — Visual Scripting ActionGraph is s&box's visual scripting system. Nodes represent actions or expressions, and links carry values or signals between…

menu_bookDocumentation
May 4, 2026

IHotloadManaged: Preserving and Restoring State Across s&box Hotloads

IHotloadManaged: Preserving State Across s&box Hotloads When a class is hotloaded in s&box, all live instances are replaced with new instances of the updated ty…

menu_bookDocumentation
May 4, 2026

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…

codeAPI Reference
May 12, 2026

s&box Projectile: Collision-based projectile

Projectile Component API Reference Projectile is a Component that implements ICollisionListener for collision-based projectiles. It destroys itself on collision…

codeAPI Reference
May 12, 2026

s&box IToolActionEvents: Tool action callbacks

IToolActionEvents Interface API Reference IToolActionEvents allows listening to tool actions across the scene. Implement this on a Component to receive callback…

codeAPI Reference
May 12, 2026

s&box TaskBase: NPC task base class

Abstract base class for NPC tasks. Tasks are executed as part of a Schedule and return a TaskStatus to indicate their state. Properties Methods TaskStatus Enum …

codeAPI Reference
May 12, 2026

s&box LinkedGameObjectBuilder: Connected object collection

Utility class for collecting connected GameObjects. Used by the Duplicator to find all objects that should be included in a duplication. Properties Methods Beha…

menu_bookDocumentation
May 20, 2026

Particle Effects: CPU-Simulated Programmable Particle System

The s&box particle system is CPU-simulated (multithreaded) and fully programmable via components. You can emit particles manually, iterate and modify them at ru…

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…

menu_bookDocumentation
May 20, 2026

Dedicated Servers: Running Local Projects with Hidden Serverside Code

s&box dedicated servers can run entirely local projects as the game using the command line argument: Assets are still fetched from the cloud version of the game…

menu_bookDocumentation
May 20, 2026

Binary Serialization: BlobData for Large GameResource Data Storage

When JSON files grow too large in s&box, you can store data as a binary blob using the class. This works with GameResource assets and provides custom serializat…

menu_bookDocumentation
May 20, 2026

Dedicated Server User Permissions: Claims-Based Access Control via Steam ID

On s&box Dedicated Servers, you can specify admin permissions per user via the file using Steam IDs and claims. Configuration Claims Claims are strings describi…

menu_bookDocumentation
May 20, 2026

NavMesh Agent: AI Pathfinding Component with Crowd Control

The s&box NavMeshAgent component moves GameObjects along the NavMesh automatically with built-in crowd control to avoid collisions between agents. Component Set…