stop the Yarn setup menu from overwriting a real scene

Fixes "Can't start dialogue: no Yarn Project has been configured."

Cause, and it was mine. Phase 3.7 said "retarget YarnDemoSetup.cs or retire it";
I retargeted it. But that menu does not modify a scene — it builds one from
scratch and calls SaveScene over its target. Pointing it at
SC101_ConferenceHall.unity armed it at the real level, and running it replaced
the scene with a bare Yarn demo: ten of fourteen roots gone, including the
player, the lighting and the navmesh. The leftover Dialogue System prefab
instance it left behind had no yarnProject override, auto-started, and produced
the error.

The scene was committed, so nothing was lost; it is restored from HEAD at 14
roots with its sun reference intact.

The menu now targets Assets/Scenes/Dev/YarnSandbox.unity and refuses to run if
its target is not under Scenes/Dev, via ScenePaths.IsDisposable. It is renamed
to "Set Up Yarn Sandbox Scene" so the menu says what it does. The other three
setup menus open and modify their target rather than regenerating it, so they
were never affected and are unchanged.

The test suite could not have caught this, because it asserted only that a
DialogueRunner existed. TheDialogueRunner_HasItsYarnProject now asserts there is
exactly one runner across the loaded scenes and that its project is set and
compiled — which reproduces the failure exactly when the scene is broken.

Also here: four UI prefabs pick up m_EditorClassIdentifier changes from
Assembly-CSharp to NightclubArcadia.Game, written by Unity after the assembly
split in the previous commit. Expected and correct.

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:14:13 +02:00
co-authored by Claude Opus 5
parent ad598143f8
commit 46160d86dc
8 changed files with 243 additions and 170 deletions
+16 -8
View File
@@ -486,24 +486,32 @@ should not be — see `docs/restructure-plan.md`.
four runtime files use — without that, everything referencing it would have stopped compiling.
Keep it in mind before adding loose scripts outside an asmdef folder.
5. **`unity run` reserves `-batchmode`, `-nographics`, `-quit`, `-logFile`.** Passing any of them
5. **`Tools ▸ Nightclub Arcadia ▸ Set Up Yarn Sandbox Scene` overwrites its target scene
wholesale.** It builds a scene from scratch and calls `SaveScene` over `ScenePath`. It is
pinned to `Assets/Scenes/Dev/` and guarded by `ScenePaths.IsDisposable`, because it was once
briefly retargeted at `SC101_ConferenceHall` and destroyed it — ten of fourteen roots, the
player and the lighting included. **Never point a scene-generating menu at a real scene.**
The other three setup menus (`PlayerControlSetup`, `UILayerSetup`, `SkillSystemSetup`) open
and modify their target, which is safe.
6. **`unity run` reserves `-batchmode`, `-nographics`, `-quit`, `-logFile`.** Passing any of them
after `--` is a hard error, and its output does not reach stdout — read `Logs/Editor.log` (§3.4).
6. **`-quit` with `-runTests`** hangs or truncates. Omit it (§3.2).
7. **`-quit` with `-runTests`** hangs or truncates. Omit it (§3.2).
7. **Exit code alone is not a test verdict.** Parse the results XML (§3.2), which is what
8. **Exit code alone is not a test verdict.** Parse the results XML (§3.2), which is what
`make test` does.
8. **`which unity` fails** in non-interactive shells even though the CLI is installed. Use the
9. **`which unity` fails** in non-interactive shells even though the CLI is installed. Use the
absolute path `/Users/lennart/.unity/bin/unity` (§3.0).
9. **Editor lock** — check before every headless run, filtering out `AssetImportWorker` children.
10. **Editor lock** — check before every headless run, filtering out `AssetImportWorker` children.
`make test` and `make build` do this for you (§2b).
10. **Regenerated assets** — hand edits to `Skills/Definitions/*`, `Candidates/Definitions/*`
11. **Regenerated assets** — hand edits to `Skills/Definitions/*`, `Candidates/Definitions/*`
and the two `*Database.asset` files are silently discarded (§2.1).
11. **`top_skill` ties** resolve to the first argument. Reordering arguments changes the game.
12. **`top_skill` ties** resolve to the first argument. Reordering arguments changes the game.
12. **`Bootstrap` must stay index 0** in the build settings, and all three scenes must be listed,
13. **`Bootstrap` must stay index 0** in the build settings, and all three scenes must be listed,
or `LoadSceneAsync` by name fails at runtime with nothing but a console error.