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.…
Network Events: INetworkListener for Player Join, Leave, and Active Callbacks
Implement or on a component to react to players joining and leaving the game. INetworkListener Example Spawn a player object when someone joins: INetworkListene…
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…
s&box TriggerPush: Trigger-based push force
TriggerPush Component API Reference TriggerPush is a Component that pushes objects (players and rigidbodies) that enter its trigger collider. Type Signature Pro…
Tracing - s&box Physics Documentation
Tracing Tracing (raycasting) is the primary way to query the physics world in s&box. It allows you to cast rays or shapes through the scene to find collisions w…
s&box SensesLayer: NPC environmental scanning
NPC behavior layer that handles awareness and environmental scanning. Caches visible/audible objects by tag for efficient querying. Properties Methods Behavior …
s&box ThrowType: Grenade throw distance
ThrowType Enum Documentation ThrowType is an enum that defines how a grenade is thrown by the HandGrenadeWeapon. It controls the throw distance and trajectory b…
Network Events: INetworkListener and INetworkSpawn Interfaces
React to players joining and leaving by implementing or on a component in the scene. INetworkListener Example Spawn a player object when someone joins: INetwork…
Network Ownership System
Network Ownership System Control who simulates and updates networked GameObjects with the ownership system. Ownership Basics Every networked object has an Owner…
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…
ConVar and ConCmd — console variables and commands with flags and game settings
ConVar and ConCmd — Console Variables and Commands and are s&box attributes for exposing variables and commands to the developer console. Console Commands Conso…
s&box IToolActionEvents: Tool action event interface
IToolActionEvents API Reference IToolActionEvents is a scene-wide interface for listening to toolgun actions before and after they execute. Type Signature Actio…
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 …
Connection Permissions - s&box Networking Documentation
Connection Permissions Connection permissions control what clients can do in your multiplayer game. Set permissions for spawning objects, using tools, or perfor…
Steam filtering API for user content sanitization
Steam Filtering API in s&box s&box provides Steam filtering APIs to sanitize user-generated content like names and chat messages. This helps prevent profanity, …
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…
Storage (UGC)
Manage user-generated content, save games, and player creations. Creating Entries Entry Properties Reading Files Listing Entries Deleting Entries Steam Workshop…
ToolMode SelectionPoint and Trace Helpers
ToolMode.SelectionPoint and Trace Helpers Helper methods and data structures for toolgun selection and placement. SelectionPoint Struct Trace Methods Placement …
Sandbox: Duplicator tool — copy, paste, and save contraptions with DuplicationData
Duplicator Tool — Copy, Paste, and Save Contraptions The Duplicator tool copies a contraption (a connected graph of GameObjects) to JSON and pastes it back. It …
PlayerController: Architecture, Ground Detection, Jump System, WishVelocity Sync, and Physics Step Integration
PlayerController: Architecture, Ground Detection, and Jump System is the built-in s&box character movement component. It uses a internally and implements to hoo…