disable the pre-split scene builders instead of retargeting them

Fixes the "no Yarn Project has been configured" error coming back after running
the setup menus.

Last commit fixed the wrong layer. Retargeting YarnDemoSetup at a sandbox
stopped it destroying the level, but left the deeper problem: all of these
builders assume the single-scene layout, and after the split there is no target
path that makes them correct.

Two failures, both observed rather than reasoned about. Running the Yarn setup
left a generated scene open whose DialogueRunner had no project and auto-started
— that is the error the user kept seeing, coming from Dev/YarnSandbox.unity, not
from Systems. And retargeting the other three at Systems made PlayerControlSetup
pull navigation in with it; the baked NavMeshData is embedded rather than an
asset, so Systems.unity silently turned binary, 61KB text to 109KB binary. That
is trap 1 recurring on a scene that had just been fixed.

So the three scene builders now return early through LegacySceneSetup.Blocked,
with a message saying what they would have done and what to do instead. They are
not deleted: UILayerSetup alone is 818 lines that still record how the UI layer
is wired, and that record matters until prefabs replace it in Phase 5.

Set Up Skill System keeps its useful half. It regenerates the SkillDefinition
assets from JSON, which touches no scene; only the WireWorkingLevelScene call is
dropped, because those objects already exist in Systems.unity. Set Up Candidate
System was always asset-only and is untouched.

While diagnosing, YarnDemoSetup's own bug was found and fixed even though the
menu is now blocked: it set yarnProject through a SerializedObject on a prefab
instance without recording the override, so the assignment was dropped on save.
It now records the modification and refuses to save a scene whose runner has no
project.

Verified by running all five menus headlessly: the two asset generators run and
produce no diff, the three builders refuse, and no scene or asset changes.
Systems.unity restored to text, the level scene intact at 5 roots.

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:24:24 +02:00
co-authored by Claude Opus 5
parent 46160d86dc
commit 4f48d258b5
7 changed files with 111 additions and 16 deletions
@@ -23,7 +23,7 @@ public static class SkillSystemSetup
const string SkillsFolder = "Assets/Skills";
const string BiblePath = "Assets/Skills/skill_bible.json";
const string DatabasePath = "Assets/Skills/SkillDatabase.asset";
const string ScenePath = NightclubArcadia.EditorTools.ScenePaths.WorkingLevel;
const string ScenePath = NightclubArcadia.EditorTools.ScenePaths.Systems;
const string AutoSetupSessionKey = "NightclubArcadia.SkillSystem.AutoSetupDone";
[DidReloadScripts]
@@ -55,7 +55,7 @@ public static class SkillSystemSetup
/// <summary>
/// Creates/updates ScriptableObject assets without opening a scene.
/// Safe to run on domain reload. Scene wiring stays on the menu item /
/// the checked-in SC101_ConferenceHall.unity Skill System objects.
/// the checked-in Systems.unity Skill System objects.
/// </summary>
static void EnsureSkillAssetsOnly()
{
@@ -122,9 +122,12 @@ public static class SkillSystemSetup
EditorUtility.SetDirty(database);
AssetDatabase.SaveAssets();
WireWorkingLevelScene(database);
// Scene wiring deliberately skipped: the Skill System objects live in
// Systems.unity and are already wired there. Regenerating the assets is
// still useful and touches no scene. See LegacySceneSetup.
AssetDatabase.SaveAssets();
Debug.Log($"Skill system setup complete. Database at {DatabasePath}; scene wired at {ScenePath}.");
Debug.Log($"Skill assets regenerated. Database at {DatabasePath}. Scene wiring skipped — "
+ "the Skill System already exists in Systems.unity.");
}
static bool TryLoadRoster(out SkillBibleEntry[] roster)
@@ -243,7 +246,7 @@ public static class SkillSystemSetup
var runner = UnityEngine.Object.FindAnyObjectByType<DialogueRunner>();
if (runner == null)
{
Debug.LogError("No DialogueRunner in SC101_ConferenceHall.unity.");
Debug.LogError("No DialogueRunner in Systems.unity.");
return;
}