Files
udxandClaude Opus 5.5 89e0fa246f Add formal enemies, remaining formal partners and synthesized UI SFX
- UI SFX v3: procedurally synthesized one-shots (Tools/synth_ui_sfx.py) wired to
  buttons, rewards, errors and red dots via UiSfx, gated by the SFX setting.
- Five formal enemies (Hornlet, Dashlet, Shellhorn, HornCaptain, GreatHorn):
  Hunyuan 50k -> 2000-tri XPbr, DGXA TokenRig, Idle/Walk/Attack, nested per type
  in PrototypeArena; PrototypeBattle.Enemy gains presentation-only Moving/Strikes.
- Formal partners for all ten pets in the arena and portraits, including new
  VineSprite, ThunderLeopard and TideWhale.
- Pipeline fixes: reject local TokenRig fallback, drop loose mesh islands,
  configurable Unity run_script timeout, companion static stage.
- Also includes concurrent work from another tool in this working tree
  (FlameLion, enemy combat FX, challenge mode, home explorer, server updates).
- Resources registered in Doc/ResDesc_*.md; verified on isolated :18081.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:23:55 +08:00

54 lines
3.0 KiB
C#

#if UNITY_EDITOR
using System;
using System.Linq;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
public static class PrepareBudBudFormal
{
public static string InspectScenes()
{
return string.Join("\n",Enumerable.Range(0,SceneManager.sceneCount).Select(i=> {
var scene=SceneManager.GetSceneAt(i);
return $"name={scene.name} path={scene.path} dirty={scene.isDirty} roots={scene.rootCount}: "+string.Join(",",scene.GetRootGameObjects().Select(g=>g.name));
}));
}
public static string SaveEmptyBatchStartup()
{
if(!Application.isBatchMode || EditorApplication.isPlaying || SceneManager.sceneCount!=1)
throw new Exception("Only the empty batch startup scene may be saved here");
var scene=SceneManager.GetSceneAt(0);
if(!string.IsNullOrEmpty(scene.path) || scene.rootCount!=0)
throw new Exception("Existing scene content must be preserved untouched");
const string path="Assets/Temp/BudBud_BatchStartup_20261020.unity";
if(AssetDatabase.LoadAssetAtPath<SceneAsset>(path)!=null)throw new Exception("Startup archive already exists");
if(!AssetDatabase.IsValidFolder("Assets/Temp"))AssetDatabase.CreateFolder("Assets","Temp");
if(!EditorSceneManager.SaveScene(scene,path))throw new Exception("Cannot preserve empty startup scene");
return "Preserved empty batch startup: "+path;
}
public static string FinishBatch()
{
if(!Application.isBatchMode || EditorApplication.isPlaying)throw new Exception("Only finish this task's batch editor in Edit Mode");
foreach(var scene in Enumerable.Range(0,SceneManager.sceneCount).Select(SceneManager.GetSceneAt))
if(scene.isDirty || (scene.path!="Assets/Temp/BudBud_BatchStartup_20261020.unity" && scene.path!="Assets/Bundles/Scenes/Review/Companion_BudBud_Review.unity"))
throw new Exception("Preserve existing scene state before closing");
EditorApplication.delayCall+=()=>EditorApplication.Exit(0);
return "Closing this task's saved batch editor; other project editors untouched";
}
public static string ArchiveDraft()
{
if(EditorApplication.isPlaying)throw new Exception("Archive in Edit Mode");
const string source="Assets/Bundles/Characters/Animal/BudBud";
const string target="Assets/Temp/BudBud_OfflineDraft_20261020";
if(AssetDatabase.IsValidFolder(target))return "Archive already exists: "+target;
if(!AssetDatabase.IsValidFolder(source))throw new Exception("Missing existing BudBud draft");
if(!AssetDatabase.IsValidFolder("Assets/Temp"))AssetDatabase.CreateFolder("Assets","Temp");
if(!AssetDatabase.CopyAsset(source,target))throw new Exception("Cannot preserve BudBud draft");
AssetDatabase.SaveAssets();AssetDatabase.Refresh();
return "Preserved draft with new archive GUIDs outside Bundles: "+target;
}
}
#endif