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 "Scene" in menu_bookDocumentation 119 results closeClear
menu_bookDocumentation
May 5, 2026

Physics Events - s&box Physics Documentation

Physics Events Receive callbacks for physics events in the scene. IScenePhysicsEvents Implement this interface on a component to receive scene-wide physics even…

menu_bookDocumentation
May 4, 2026

Component.OnLoad: Async Loading Pattern — LoadingContext, Scene.IsLoading, and Loading Screen Integration

Component.OnLoad: Async Loading Pattern for Components Components can perform async loading work by overriding . This is the correct way to load resources async…

menu_bookDocumentation
May 4, 2026

Scene Object Index: How Scene.GetAll Works — Type Hierarchy Indexing, Update Sets, and Hotload Safety

Scene Object Index: How Scene.GetAll<T> Works and Why It's Fast is the primary way to find all active components or systems of a type in the scene. Understandin…

menu_bookDocumentation
May 4, 2026

GameObjectSystem with [Sync] and RPCs: Networked Scene-Level State

GameObjectSystem with [Sync]: Networked Scene-Level State supports properties just like components. However, there is a key difference: all properties on a are …

menu_bookDocumentation
May 20, 2026

Scene Metadata: ISceneMetadata for Queryable Scene and Prefab Data

The interface in s&box allows Components to save data that can be accessed without loading a Scene or cloning a Prefab. Metadata is accessible via or directly. …

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 4, 2026

RealTime vs Time: Wall-Clock vs Scene Time — RealTimeSince, RealTimeUntil, GlobalNow, and SmoothDelta

RealTime vs Time: Wall-Clock vs Scene Time — When to Use Each s&box has two time systems. Choosing the wrong one is a common source of bugs. Time (Scene Time) ,…

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 4, 2026

Sandbox: CleanupSystem — full scene cleanup and per-player cleanup with Ownable

Sandbox CleanupSystem — Scene Cleanup and Per-Player Cleanup is a that handles cleaning up spawned objects. It distinguishes between "baseline" objects (part of…

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

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…

menu_bookDocumentation
May 5, 2026

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…

menu_bookDocumentation
May 4, 2026

Sandbox: BanSystem — persistent ban list with INetworkListener.AcceptConnection

Sandbox BanSystem — Persistent Ban List with INetworkListener is a that implements to intercept incoming connections and reject banned players before they join.…

menu_bookDocumentation
May 5, 2026

Clutter System — scattering grass, rocks, and debris with GPU instancing

Clutter System — Scattering Grass, Rocks, and Debris The Clutter System scatters large amounts of small objects (grass, rocks, debris) across a scene using GPU-…

menu_bookDocumentation
May 20, 2026

Component Editor Tools: Selection-Based Scene View UI and Gizmos

Component Editor Tools in s&box are always active when a specific Component is selected. They create UI in the scene view and can override input. An example is …

menu_bookDocumentation
May 12, 2026

LocalData persistence for server-side data

LocalData Persistence in s&box LocalData provides server-side data persistence that survives server restarts. It's useful for storing configuration, ban lists, …

menu_bookDocumentation
May 5, 2026

Your First Project - s&box Documentation

Your First Project Creating Game Objects In s&box, everything in your scene is a GameObject. GameObjects can have Components attached to them that provide funct…

menu_bookDocumentation
May 4, 2026

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 …

menu_bookDocumentation
May 20, 2026

Unit Tests: MSTest with Engine Initialization for Component Testing

s&box supports unit testing via a directory in your project. The engine auto-generates a test project when this directory exists (restart editor after creating …

menu_bookDocumentation
May 20, 2026

Scene Events: Interface-Based Broadcasting and Listening

s&box uses interface-based events to broadcast and listen to events within a scene. Events are sent to active Components and GameObjectSystems — they are NOT se…