add an Open Game Scenes menu, and fix the Editor-lock check

The scenes were never destroyed. Pressing Play with only Bootstrap open means
GameBootstrap loads Systems and the level at runtime, and Unity discards
runtime-loaded scenes when Play ends, restoring whatever the Editor had open —
Bootstrap alone. The Hierarchy comes back nearly empty. Every scene file was
byte-identical to HEAD throughout, still text.

Tools > Nightclub Arcadia > Open Game Scenes opens all three with the level
active, which is the authoring setup. With them already open, GameBootstrap's
LoadIfNeeded skips them and they survive Play. GameSceneWorkflow also captures
the scene setup before Play and restores it afterwards as a safety net, skipping
the restore when Unity already got it right and ignoring scenes deleted meanwhile
— an exception in that callback would leave the Editor in a worse state than the
problem it fixes. Toggleable under the same menu.

Also fixes `make lock`, which had a self-matching bug since Phase 1: `pgrep -f`
on the full binary path matched the very shell running the check, because the
pattern appears in its own command line. It reported the Editor as running when
nothing was, and would have blocked every make test/build once anything else
matched. Now `pgrep -x Unity`, which matches the process name and cannot match
the shell.

EditMode 42/42, PlayMode 6/6, YarnCheck 9 files / 35 nodes.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
2026-08-25 21:35:36 +02:00
co-authored by Claude Opus 5
parent 4f48d258b5
commit 2a20bd68fe
4 changed files with 156 additions and 1 deletions
+10
View File
@@ -233,6 +233,16 @@ Assets/Scenes/
`Bootstrap` must stay index 0 in the build settings. The level is made the active scene after
load, so new objects and lighting land there rather than in Bootstrap.
**Working in the Editor.** `Tools ▸ Nightclub Arcadia ▸ Open Game Scenes` opens all three at
once, with the level active. Do that before pressing Play.
If you press Play with only `Bootstrap` open, `GameBootstrap` loads the other two *at runtime*,
and Unity discards runtime-loaded scenes when Play ends — the Hierarchy comes back with Bootstrap
alone and it looks as though the scenes were destroyed. **Nothing is written to disk**; it is the
Hierarchy, not the files. With all three already open, `GameBootstrap` skips loading them
(`LoadIfNeeded`) and they are still there afterwards. `GameSceneWorkflow` also captures and
restores the scene setup around Play as a safety net; toggle it under the same menu.
```
writing/
├── README.md session entry point