feat(editor): 新增 SaveSystem 测试窗口并更新验证工具读档入口
This commit is contained in:
@@ -586,7 +586,7 @@ namespace AibisDream.SaveSystem.Editor
|
||||
return;
|
||||
}
|
||||
|
||||
GameManager.Instance.StartCoroutine(SaveRestoreOrchestrator.RestoreFromSlot(slotIndex));
|
||||
GameManager.Instance.StartWithSlot(slotIndex);
|
||||
Log($"已启动 Restore slot_{slotIndex}。请观察 Restore Pipeline Log 与场景状态。");
|
||||
}
|
||||
|
||||
@@ -622,13 +622,31 @@ namespace AibisDream.SaveSystem.Editor
|
||||
$"yarnVariables.strings: {snapshot.yarnVariables?.strings?.Count ?? 0} entries",
|
||||
$"yarnVariables.bools: {snapshot.yarnVariables?.bools?.Count ?? 0} entries",
|
||||
$"sections: {(snapshot.sections != null ? string.Join(", ", snapshot.sections.Keys) : "null")}",
|
||||
"JSON preview (first 1500 chars):",
|
||||
json.Length > 1500 ? json.Substring(0, 1500) + "..." : json
|
||||
};
|
||||
|
||||
if (snapshot.sections != null)
|
||||
{
|
||||
AppendFixSectionHint(lines, snapshot, SnapshotProviderIds.PunchTape);
|
||||
AppendFixSectionHint(lines, snapshot, SnapshotProviderIds.Fix);
|
||||
AppendFixSectionHint(lines, snapshot, SnapshotProviderIds.FixPanel);
|
||||
AppendFixSectionHint(lines, snapshot, SnapshotProviderIds.BodyModule);
|
||||
AppendFixSectionHint(lines, snapshot, SnapshotProviderIds.Eye);
|
||||
}
|
||||
|
||||
lines.Add("JSON preview (first 1500 chars):");
|
||||
lines.Add(json.Length > 1500 ? json.Substring(0, 1500) + "..." : json);
|
||||
|
||||
Log(string.Join("\n", lines));
|
||||
}
|
||||
|
||||
private static void AppendFixSectionHint(List<string> lines, SaveSnapshot snapshot, string sectionId)
|
||||
{
|
||||
if (snapshot.sections.ContainsKey(sectionId))
|
||||
{
|
||||
lines.Add($" [fix-related] {sectionId}: captured");
|
||||
}
|
||||
}
|
||||
|
||||
private void Log(string message)
|
||||
{
|
||||
_lastLog = $"[{DateTime.Now:HH:mm:ss}] {message}";
|
||||
|
||||
Reference in New Issue
Block a user