Code

Code

S&box games are written in C#. The engine features a hotload system that compiles and applies your code changes within milliseconds, so you can iterate without restarting.

Code Basics

Cheat sheets, math types, console variables, and API whitelist information to get you productive quickly.

Advanced Topics

Code generation, hotloading internals, and unit testing.

Libraries

How to use and create reusable code libraries for your projects.

Source: Facepunch/sbox-docs (CC-BY-4.0) · updated 2026-04-10. Read it rendered on the official docs.

More in Code

Community wiki — not affiliated with Facepunch Studios. For the latest and most authoritative information, see the official developer wiki.