using UnityEditor; using UnityEngine; // 서황 대부 도끼 프리팹(2026-11-20 PD 「서황의 도끼를 Stylized Shoot & Hit Vol.2 에셋의 FX_Shoot_Axe 이펙트를 활용해서 다시 제작 · 현재 이펙트는 도끼처럼 보이지 않아」) // TKS_Fx_C_AxeOrbit = 팩 원본 FX_Shoot_Axe_projectile(도는 도끼 메시 + 빛 궤적) 2개를 유닛 둘레 타원 궤도로 돌림(TKS.SkillVfxOrbit) — // 팩 도끼는 정면·위에서 보면 옆면(납작한 막대)이라 도끼 날 면이 화면을 보도록 Y 90° 돌려 앉힘(띠 그림 실측) · 크기 단위 = 유닛 키 1(표 size 1) · // 궤도 가로 0.8 · 세로 0.35(유닛 키 배수 · 도끼 반경 p1 1.2 + 유닛 반지름 근처) · 0.9초에 한 바퀴 · 도끼 길이 ≈ 0.45 키 · 팩 원본 무수정(프리팹 안에 원본을 넣은 사본). // 실행: unity command --project-path . --timeout 300 script eval --file Tools/build_axe_orbit.cs string src = "Assets/VFX/VFX_Klaus/Prefabs/Stylized Shoot & Hit Vol.2/FX_Shoot_Axe_projectile.prefab"; string dst = "Assets/Resources/Fx/TKS_Fx_C_AxeOrbit.prefab"; int AXES = 2; float AXE_SCALE = 0.3f, RX = 0.8f, RY = 0.35f, DEG = 400f; // 1차 0.18 = 캡처에서 너무 작아 안 보임 float FACE_Y = 90f; // 2026-11-20 PD 「서황의 도끼가 너무 세워진 상태로 돌고 있음 · 조금 더 각도를 눕힌 상태(도끼날이 베는 느낌)로 회전」 = 화면을 보는 도끼(바퀴처럼 선 채 돎)를 // X 축으로 LAY 도 눕힘 → 도끼가 도는 면이 땅(궤도 타원)과 가까워져 몸 둘레를 수평으로 베며 돎 float LAY = -55f; AssetDatabase.Refresh(); var axe = AssetDatabase.LoadAssetAtPath(src); if (axe == null) return "원본 없음: " + src; var root = new GameObject("TKS_Fx_C_AxeOrbit"); var orbit = root.AddComponent(); orbit.radiusX = RX; orbit.radiusY = RY; orbit.degPerSec = DEG; for (int i = 0; i < AXES; i++) { var a = (GameObject)PrefabUtility.InstantiatePrefab(axe); PrefabUtility.UnpackPrefabInstance(a, PrefabUnpackMode.Completely, InteractionMode.AutomatedAction); a.name = "Axe" + i; a.transform.SetParent(root.transform, false); float ang = 360f * i / AXES * Mathf.Deg2Rad; a.transform.localPosition = new Vector3(Mathf.Cos(ang) * RX, Mathf.Sin(ang) * RY, 0f); a.transform.localRotation = Quaternion.Euler(LAY, 0f, 0f) * Quaternion.Euler(0f, FACE_Y, 0f); a.transform.localScale = Vector3.one * AXE_SCALE; foreach (var ps in a.GetComponentsInChildren(true)) { var m = ps.main; m.scalingMode = ParticleSystemScalingMode.Hierarchy; } } PrefabUtility.SaveAsPrefabAsset(root, dst); Object.DestroyImmediate(root); AssetDatabase.SaveAssets(); return "ok " + dst;