s&box
RustCounter-Strike 2s&boxDeadlock
Wiki
Get s&box on Steam
Browse
OverviewGetting StartedCreating GamesEngine & ToolsDocumentationCommunity GamesResources
s&boxDocumentationExportingStandalone Code
SOURCE 2 · C#
Build and play games with s&box.

Facepunch's game engine and creation platform — make games in C#, or jump straight into community games.

Get s&box on Steam

s&box Wiki

  • Overview
  • Getting Started
  • Creating Games
  • Engine & Tools
  • Documentation
  • Community Games
  • Resources

Tools & Community

  • Getting Started
  • Creating Games
  • Engine & Tools
  • Resources

Platforms

  • RustBattle
  • CSBattle
  • Rust Game Wiki
  • CS2 Skins Wiki
  • Deadlock Wiki

About

  • Official Site
  • Developer Wiki
  • GitHub
  • Get on Steam
NOT AFFILIATED WITH FACEPUNCH STUDIOS · © 2026 s&box Wiki (community)
Docs/Exporting
Exporting

Standalone Code

When your game is exported as a standalone build, it runs outside of the s&box platform. This gives you access to APIs and capabilities that aren't available in platform games.

STANDALONE Constant

Exported games are compiled with a STANDALONE constant. Use this to branch logic between platform and standalone builds.

#if STANDALONE
// code that only runs in an exported game
#endif

Disabling the Whitelist

Platform games enforce an API whitelist that blocks potentially dangerous .NET APIs. Standalone games can disable this restriction entirely.

To disable the whitelist, open your project settings and turn off the whitelist option. This gives you full access to the .NET runtime - but your game won't be publishable to the s&box platform while the whitelist is disabled.

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

More in Exporting

Exporting Standalone
← All documentation

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