42 lines
1.9 KiB
C#
42 lines
1.9 KiB
C#
using System.IO;
|
|
using TKS.OutGame;
|
|
using UnityEditor;
|
|
using UnityEditor.SceneManagement;
|
|
using UnityEngine;
|
|
|
|
namespace TKS.EditorTools
|
|
{
|
|
/// <summary>
|
|
/// 시나리오 이벤트(전장 설명 · 보스 등장 연출) 검증 캡처 — 2026-11-12 개발 요청서 C1·C2.
|
|
/// Unity.exe -projectPath <proj> -force-d3d11 -executeMethod TKS.EditorTools.ScenarioCapture.Run -scDir <dir>
|
|
/// [-scPopups 1-1,1-10] [-scStages 1-10,5-10,10-20] [-scTimes 0.3,1.0,1.6,2.4,3.4,4.8]
|
|
/// 팝업 = 그 스테이지 팝업 1장 · 스테이지 = 보스 연출을 시각마다 1장 + 아군 차례 1장 · 끝나면 스스로 종료.
|
|
/// </summary>
|
|
public static class ScenarioCapture
|
|
{
|
|
public static void Run()
|
|
{
|
|
string dir = Arg("-scDir");
|
|
if (string.IsNullOrEmpty(dir)) dir = Path.Combine(Directory.GetCurrentDirectory(), "Logs", "scenario_capture");
|
|
DataImporter.ImportAll();
|
|
UIThemeImporter.Import();
|
|
EditorSceneManager.OpenScene(ProjectSetup.ScenePath, OpenSceneMode.Single);
|
|
SessionState.SetBool(SaveStore.MemoryFlagKey, true);
|
|
SessionState.SetString(ScenarioCaptureDriver.DirKey, dir);
|
|
SessionState.SetString(ScenarioCaptureDriver.PopupKey, Arg("-scPopups") ?? "1-1,1-10");
|
|
SessionState.SetString(ScenarioCaptureDriver.StagesKey, Arg("-scStages") ?? "1-10,5-10,10-20");
|
|
SessionState.SetString(ScenarioCaptureDriver.TimesKey, Arg("-scTimes") ?? "0.3,1.0,1.6,2.4,3.4,4.8");
|
|
Debug.Log("[TKS] 시나리오 캡처 시작 → " + dir);
|
|
EditorApplication.EnterPlaymode();
|
|
}
|
|
|
|
static string Arg(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;
|
|
}
|
|
}
|
|
}
|