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 "csharp" in terminalCode Example 100 results closeClear
terminalCode Example
May 5, 2026

Post-processing and camera setup — CameraComponent, PostProcessVolume, Bloom, DoF, and Film Grain

Post-Processing and Camera Setup CameraComponent Orthographic Camera Multiple Cameras (Priority) Higher priority renders on top. Use for split-screen, minimaps,…

terminalCode Example
May 5, 2026

Async tasks in s&box — coroutines, parallel tasks, and frame-by-frame animation

Async Tasks in s&box Components s&box async tasks run on the main thread — they behave like coroutines. Use to yield one frame, to wait, and to run tasks in par…

terminalCode Example
May 5, 2026

Collider types — Box, Sphere, Capsule, Model, Hull, Plane, and Trigger volumes

Collider Types s&box provides several collider components for physics shapes. All colliders can be set as triggers (no physical response, just overlap detection…

terminalCode Example
May 5, 2026

Scene lighting setup — DirectionalLight, PointLight, SpotLight, SkyBox, AmbientLight, and Fog

Scene Lighting Setup s&box lighting is built from components. A typical scene needs a directional light (sun), ambient light, and a skybox. Directional Light (S…

terminalCode Example
May 5, 2026

Particle Effect system — emitters, manual emission, and custom controllers

Particle Effect System s&box particles are CPU-simulated and fully programmable. A particle system is built from three component types on the same GameObject: (…

terminalCode Example
May 3, 2026

Working with Models and Rendering

Guide to displaying 3D models in s&box. ModelRenderer Component Loading Models SkinnedMeshRenderer (Animated Models) Dynamic Model Creation LODs (Level of Detai…

terminalCode Example
May 5, 2026

Rendering entities — TextRenderer, LineRenderer, SpriteRenderer, TrailRenderer, and ModelRenderer

Rendering Entities — Text, Line, Sprite, and Trail Renderers s&box provides several lightweight renderer components for common visual needs that don't require a…

terminalCode Example
May 5, 2026

Spatial audio components — SoundPoint, SoundBox, SoundscapeTrigger, DspVolume, and AudioListener

Spatial Audio Components s&box provides several components for placing audio in the world. All are alternatives to for persistent, positioned audio sources. Sou…

terminalCode Example
May 5, 2026

Physics joints — Fixed, Ball, Hinge, Slider, Spring, and Wheel

Physics Joints Joints connect two physics bodies together with constraints. All joint types are components added to a GameObject positioned at the joint's ancho…

terminalCode Example
May 3, 2026

Camera and View Control

Working with cameras and player viewpoints in s&box. Main Camera Access Creating a Player Camera First-Person Camera Screen to World Ray World to Screen Camera …

terminalCode Example
May 5, 2026

Math types — Vector3, Rotation, Angles, Transform, TimeSince, and BBox

Math Types — Vector3, Rotation, Angles, and Transform s&box uses its own math types. Here's a practical reference for the ones you'll use constantly. Vector3 Ro…

terminalCode Example
May 3, 2026

Chat UI Pattern with RPC Broadcasting

Chat UI with RPC Broadcasting A Razor UI component for game chat that handles local input, RPC broadcasting, Steam filtering, and automatic message expiration. …

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…

terminalCode Example
May 5, 2026

RadiusDamage — explosion area damage with IDamageable, occlusion, and physics force

RadiusDamage Component is a built-in s&box component that applies damage to all objects within a sphere. It integrates with the system and can apply outward phy…

terminalCode Example
May 5, 2026

WorldPanel and ScreenPanel — HUD overlays and 3D world-space UI with Razor PanelComponent

WorldPanel and ScreenPanel — UI in the World s&box UI uses (Razor) attached to either a (HUD overlay) or (3D world-space UI). The same component works with both…

terminalCode Example
May 3, 2026

Controller Input

Handle gamepad/controller input in s&box. Detecting Controllers Analog Inputs Auto-Mapped Input Haptics/Rumble Motion Controls Local Multiplayer

terminalCode Example
May 5, 2026

BeamEffect — laser and energy beams between two points

BeamEffect — Laser and Energy Beams renders a beam between two points in the world. Use it for lasers, electricity, tractor beams, or any line-based visual effe…

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

terminalCode Example
May 3, 2026

Multiplayer and Networking

Complete guide to multiplayer setup in s&box. Creating a Lobby Joining a Lobby Spawning Networked Players Host/Client Checks Connection Events Networked Object …

terminalCode Example
May 3, 2026

BanSystem Pattern for Player Management

BanSystem - Player Ban Management A GameObjectSystem that manages player bans with persistent storage. Demonstrates , persistence, and RPC commands. Implementat…