Prefabs - s&box Documentation
Prefabs Prefabs are reusable GameObject templates that allow you to create consistent, repeatable objects across your game. You create a prefab asset from a Gam…
Controller Input
Handle gamepad/controller input in s&box. Detecting Controllers Analog Inputs Auto-Mapped Input Haptics/Rumble Motion Controls Local Multiplayer
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 …
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…
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…
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 …
Achievements and Services
s&box provides built-in services for achievements, stats, and leaderboards. Achievements Unlock an Achievement Achievement Types Stat-based - Auto-unlock when s…
ToolMode Base Class for Toolgun Modes
ToolMode Base Class Abstract base class for creating toolgun modes in s&box. Handles input registration, action dispatch, and HUD rendering. Class Overview Acti…
s&box INetworkListener: Connection interception
Interface for network connection interception. Implement to accept or reject incoming connections. Methods Usage Implement on a GameObjectSystem or Component to…
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, …
s&box CameraNoiseSystem: Camera noise manager
GameObjectSystem that manages camera noise effects. Implements ICameraSetup to apply noise during camera rendering. Behavior Maintains a list of active BaseCame…
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 …
Libraries - s&box Code Documentation
Libraries Libraries are reusable code packages you can share between projects or distribute to others. They provide a way to modularize your code and avoid dupl…
Auth Tokens - s&box Services Documentation
Auth Tokens Auth tokens allow your game to authenticate players with external backends. The token proves the player's identity and can be validated against Face…
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 …
Editor Shortcuts - s&box Editor Documentation
Editor Shortcuts Custom keyboard shortcuts make your editor tools more efficient. Shortcuts can be bound globally or to specific widgets. Creating a Static Shor…
Rpc.FilterInclude for targeted RPC broadcasting
Rpc.FilterInclude for Targeted RPC Broadcasting Rpc.FilterInclude is a using statement in s&box that restricts RPC broadcasts to specific connections only. This…
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…
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…
Randomized Clothing for NPC Citizens using Dresser.Randomize() on Prefabs
Overview This demonstrates how to create NPC citizen prefabs with randomized clothing using the built-in component. Each time the prefab spawns or is enabled, i…