s&box/field-guide
the symptom, in your words

"Getting set up: new project skeleton"

✓ verified on engine 26.07lane: Getting set upposted
▸ SYMPTOM

Empty or half-copied project won't Play, Razor can't find types, or you're unsure what the minimum viable folder layout is.

▸ CAUSE

s&box projects are a small, opinionated tree: manifest, assets, code assembly referencing the Steam install, and a tiny startup scene that bootstraps the rest in code.

▸ FIX

Folder layout

snippet
<project>/
├── <project>.sbproj
├── Assets/
│   ├── scenes/*.scene
│   ├── models/…
│   └── materials/…
├── Code/
│   ├── Assembly.cs
│   ├── <project>.csproj
│   └── <domain>/*.cs + UI/*.razor(.scss)
├── Editor/
├── ProjectSettings/
│   ├── Input.config
│   └── Collision.config / Platform.config
└── tools/                  # optional python generators

.sbproj essentials

snippet
{
  "Title": "YourGame",
  "Type": "game",
  "Org": "local",
  "Ident": "yourgame",
  "Schema": 1,
  "Metadata": {
    "MaxPlayers": 64,
    "MinPlayers": 1,
    "TickRate": 50,
    "GameNetworkType": "Multiplayer",
    "StartupScene": "scenes/main.scene"
  }
}
  • TickRate: 50 → fixed update 50 Hz.
  • Keep GameNetworkType: "Multiplayer" even for single-player (architecture stays open).
  • StartupScene is what Play loads.

csproj / Assembly.cs

  • TargetFramework net10.0, references Sandbox.*.dll under the Steam s&box bin/managed/ install.
  • Verify without the editor:
snippet
dotnet build Code\<project>.csproj
snippet
global using Sandbox;
global using System;
global using System.Collections.Generic;
global using System.Linq;
global using System.Threading.Tasks;
global using YourGame; // must match @namespace in .razor files

Minimal scene + bootstrap

Scene JSON: exactly four GameObjects — Sun (DirectionalLight), Skybox (SkyBox2D + EnvmapProbe), Camera (CameraComponent, IsMainCamera: true), Bootstrap (custom component, plain __type class name, often namespace-free for scene binding).

snippet
protected override void OnStart()
{
    if (Scene.IsEditor) return;
    // 1. manager singletons (OnAwake publishes .Instance)
    // 2. static world
    // 3. player
    // 4. camera/sun attachments
    // 5. UI (one GO: ScreenPanel + PanelComponents)
    // 6. game-state last
}

Input.config

JSON list of { Name, GroupName, Title, KeyboardCode, GamepadCode }. WASD named Forward/Backward/Left/Right feeds Input.AnalogMove. Underscores must match; press/down/released names are case-insensitive.

Startup checklist

  1. Folders + Title/Ident/StartupScene in .sbproj
  2. Assembly.cs globals + razor namespace
  3. 4-object scene + Bootstrap
  4. dotnet build green
  5. Optional: art generators (blender-headless-pipeline)
  6. Prefix Log.Info with a project tag; watch console each Play
▸ WHY IT WORKS

The editor only needs a mountable package + a startup scene. Bootstrap-in-code avoids scene/code drift and matches the lifecycle rules for singletons and UI. Headless dotnet build against the Steam assemblies is the fastest compile gate before you open the editor.

Verified on engine 26.07 — seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?