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

GameResource Extensions - s&box Assets Documentation

GameResource Extensions Extend GameResource types with additional data. Create extensions that attach to existing resources like models or sounds. Creating a Re…

menu_bookDocumentation
May 20, 2026

GameResource Extensions: Appending Data to Existing Assets Without Modification

ResourceExtensions in s&box append additional data to existing GameResources without modifying the original class or assets. Useful for adding properties to Clo…

codeAPI Reference
May 12, 2026

s&box ResourceSelectAttribute: Resource picker configuration

ResourceSelectAttribute API Reference ResourceSelectAttribute is used to configure resource selection UI for properties in the inspector. Type Signature Propert…

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

s&box Vector3 extension for aim cone randomization

s&box Vector3 Extension for Aim Cone Randomization This example shows extension methods for adding random spread to Vector3 direction vectors using s&box's Game…

menu_bookDocumentation
May 12, 2026

s&box Vector3.WithAimCone: Direction spread

Vector3.WithAimCone Extension Method The WithAimCone extension method adds random spread to a direction vector, useful for bullet spread, projectile dispersion,…

terminalCode Example
May 10, 2026

Extensible Player Data Save Hooks for World Components

This pattern lets gameplay components plug into a player's save/load flow without putting every feature directly inside one large class. The framework has three…

codeAPI Reference
May 3, 2026

Sandbox.GameResource

Sandbox.GameResource Base class for custom asset types. Overview GameResource is the base class for creating custom asset types that appear in the editor with f…

codeAPI Reference
May 12, 2026

s&box ThrusterDefinition: Thruster type GameResource

ThrusterDefinition GameResource API Reference ThrusterDefinition is a GameResource that defines a thruster type with a prefab, used by the Thruster tool to spaw…

codeAPI Reference
May 12, 2026

s&box SoundDefinition: Categorized sound GameResource

SoundDefinition GameResource API Reference SoundDefinition is a GameResource that defines a categorized sound for use on spawned entities (thrusters, hoverballs…

codeAPI Reference
May 12, 2026

s&box ScriptedEmitter: Particle emitter GameResource

ScriptedEmitter GameResource API Reference ScriptedEmitter is a GameResource that defines a particle/VFX emitter with a prefab, used for spawning visual effects…

menu_bookDocumentation
May 20, 2026

Custom GameResource Assets: Define, Create, and Access Custom Asset Types

Define custom asset types as subclasses. They get a nice inspector window, are hotloaded in-game, and are stored as JSON files with a custom extension. Creating…

codeAPI Reference
May 12, 2026

s&box BalloonDefinition: Balloon type GameResource

BalloonDefinition GameResource API Reference BalloonDefinition is a GameResource that defines a balloon type with a prefab, used by the Balloon tool to spawn ba…

codeAPI Reference
May 12, 2026

s&box AmmoResource: Shared ammo type GameResource

AmmoResource GameResource API Reference AmmoResource is a GameResource that defines a type of ammo that can be shared across weapons. Weapons that reference the…

terminalCode Example
May 5, 2026

Custom GameResource assets — defining asset types with ResourceLibrary and PostLoad registry

Custom GameResource Assets lets you define your own asset types with a custom file extension, inspector UI, and hot-reload support. Assets are JSON files under …

menu_bookDocumentation
May 12, 2026

s&box ISpawnerExtensions: Creating spawner instances

ISpawnerExtensions: Creating ISpawner Instances ISpawnerExtensions provides an extension method to create ISpawner instances from type strings, supporting vario…

codeAPI Reference
May 12, 2026

s&box PostProcessResource: Post-processing effect GameResource

PostProcessResource GameResource API Reference PostProcessResource is a GameResource that defines a post-processing effect with a prefab, used by the PostProces…

codeAPI Reference
May 12, 2026

s&box HoverballDefinition: Hoverball type GameResource

HoverballDefinition GameResource API Reference HoverballDefinition is a GameResource that defines a hoverball type with a prefab, used by the Hoverball tool to …

codeAPI Reference
May 12, 2026

s&box WheelDefinition: Wheel type GameResource

WheelDefinition GameResource API Reference WheelDefinition is a GameResource that defines a wheel type with a prefab, used by the Wheel tool to spawn wheels. Ty…

codeAPI Reference
May 12, 2026

s&box ScriptedEntity: Custom entity GameResource

ScriptedEntity GameResource API Reference ScriptedEntity is a GameResource that defines a spawnable entity with a prefab, used by the spawn menu to create custo…