ThreeKingdomsSlingshot/Tools/make_skill_fx_copies.cs

20 lines
1002 B
C#
Raw Normal View History

using System.IO;
using UnityEditor;
using UnityEngine;
// 스킬 이펙트 사본 일괄 만들기(2026-11-11) — Tools/skill_vfx_design.py 가 적어 둔 목록(<catalog 폴더>/copies.txt · 한 줄 = 원본 경로|사본 이름)을
// 읽어 Resources/Fx 에 사본을 만든다(TKS.EditorTools.SkillTestTools.MakeCopy · 원본 팩 무수정 · 이미 있으면 건너뜀).
// 실행: unity command --project-path . --timeout 300 script eval --file Tools/make_skill_fx_copies.cs
string dir = File.ReadAllText("Tools/fx_catalog_dir.txt").Trim();
int made = 0, skip = 0, fail = 0;
foreach (var line in File.ReadAllLines(dir + "/copies.txt"))
{
var c = line.Split('|');
if (c.Length < 2) continue;
if (File.Exists("Assets/Resources/Fx/" + c[1] + ".prefab")) { skip++; continue; }
var res = TKS.EditorTools.SkillTestTools.MakeCopy(c[0], c[1]);
if (res == null) fail++; else made++;
}
AssetDatabase.Refresh();
return "사본 " + made + " · 있음 " + skip + " · 실패 " + fail;