using TKS.OutGame; using UnityEditor; using UnityEditor.SceneManagement; using UnityEngine; namespace TKS.EditorTools { /// /// 타이틀 화면 검증 캡처(PD 2026-11-13) — 사본 프로젝트에서: /// Unity.exe -projectPath <사본> -force-d3d11 -executeMethod TKS.EditorTools.TitleCapture.Capture -titleDir <dir> /// 메모리 세이브 · Battle 씬 → Play → TitleCaptureDriver 가 찍고 스스로 종료(UI 캡처와 따로 · 1회 ≈ 수십 초). /// public static class TitleCapture { public static void Capture() { string dir = GetArg("-titleDir"); if (string.IsNullOrEmpty(dir)) dir = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), "Logs", "title_capture"); EditorSceneManager.OpenScene(ProjectSetup.ScenePath, OpenSceneMode.Single); SessionState.SetBool(SaveStore.MemoryFlagKey, true); SessionState.SetString(TitleCaptureDriver.DirKey, dir); Debug.Log("[TKS] 타이틀 캡처 시작 → " + dir); EditorApplication.EnterPlaymode(); } static string GetArg(string name) { var args = System.Environment.GetCommandLineArgs(); for (int i = 0; i < args.Length - 1; i++) if (args[i] == name) return args[i + 1]; return null; } } }