From 6ed6efe6a21658df6d35b7823b391973cf582864 Mon Sep 17 00:00:00 2001 From: swrring Date: Wed, 13 May 2026 23:58:39 +0900 Subject: [PATCH] =?UTF-8?q?fix(BT12-Dev):=20fx=20ParticleSystem.scalingMod?= =?UTF-8?q?e=20=3D=20Hierarchy=20=EC=A0=84=EC=88=98=20=EC=A0=81=EC=9A=A9?= =?UTF-8?q?=20(PD=20=EC=A7=80=EC=8B=9C=202026-05-13)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 원인: fx.transform.localScale *= HitFxScale 영역 적용·그러나 ParticleSystem.MainModule.scalingMode 영역 = Local·Shape 영역 영역 영역 root scale 영역 영역 X·ParticleSystem 영역 자체 size 영역 영역 영역 영역. fix: 모든 fx spawn 영역 ParticleSystem foreach 영역 영역 ScalingMode = Hierarchy 설정 + Play(true) 동시. Hierarchy 영역 = parent Transform scale 영역 정합 적용. 전수 적용 (7 파일): - Projectile.OnTriggerEnter2D — OnHitFx - ProjectileSpawner.Trigger — CastFx + ProjectilePrefab - MeleeAreaSpawner.Trigger — fxGo - LightningStrikeSpawner — OnHitFx + ExtraHitFx - LaserSpawner.Trigger — fx - PoisonSwampSpawner — swampGo + Marker.Tick fx - SpiritFireSpawner — shieldGo Co-Authored-By: Claude Opus 4.7 (1M context) --- Assets/Scripts/Skills/Effectors/LaserSpawner.cs | 2 +- Assets/Scripts/Skills/Effectors/LightningStrikeSpawner.cs | 4 ++-- Assets/Scripts/Skills/Effectors/MeleeAreaSpawner.cs | 2 +- Assets/Scripts/Skills/Effectors/PoisonSwampSpawner.cs | 2 ++ Assets/Scripts/Skills/Effectors/Projectile.cs | 2 +- Assets/Scripts/Skills/Effectors/ProjectileSpawner.cs | 4 ++-- Assets/Scripts/Skills/Effectors/SpiritFireSpawner.cs | 1 + 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Assets/Scripts/Skills/Effectors/LaserSpawner.cs b/Assets/Scripts/Skills/Effectors/LaserSpawner.cs index 83b4142..3bb2704 100644 --- a/Assets/Scripts/Skills/Effectors/LaserSpawner.cs +++ b/Assets/Scripts/Skills/Effectors/LaserSpawner.cs @@ -40,7 +40,7 @@ namespace EerieVillage.Skills.Effectors fx.transform.SetParent(inventory.transform, true); fx.transform.localScale *= data.HitFxScale; // PD 지시 2026-05-13 — ParticleSystem 명시 Play - foreach (var ps in fx.GetComponentsInChildren(true)) ps.Play(true); + foreach (var ps in fx.GetComponentsInChildren(true)) { var m = ps.main; m.scalingMode = ParticleSystemScalingMode.Hierarchy; ps.Play(true); } } float fxLifetime = GetFxLifetime(fx); diff --git a/Assets/Scripts/Skills/Effectors/LightningStrikeSpawner.cs b/Assets/Scripts/Skills/Effectors/LightningStrikeSpawner.cs index a88b0d2..a65c19e 100644 --- a/Assets/Scripts/Skills/Effectors/LightningStrikeSpawner.cs +++ b/Assets/Scripts/Skills/Effectors/LightningStrikeSpawner.cs @@ -66,7 +66,7 @@ namespace EerieVillage.Skills.Effectors fx.hideFlags = HideFlags.DontSave; // PD 지시 2026-05-13 — Scene 저장 회피 fx.transform.localScale *= data.HitFxScale; // PD 지시 2026-05-13 — ParticleSystem 명시 Play - foreach (var ps in fx.GetComponentsInChildren(true)) ps.Play(true); + foreach (var ps in fx.GetComponentsInChildren(true)) { var m = ps.main; m.scalingMode = ParticleSystemScalingMode.Hierarchy; ps.Play(true); } fxTotalLifetime = GetFxLifetime(fx); AutoDestroyFx(fx, fxTotalLifetime); } @@ -116,7 +116,7 @@ namespace EerieVillage.Skills.Effectors extraFx.hideFlags = HideFlags.DontSave; extraFx.transform.localScale *= data.HitFxScale; // PD 지시 2026-05-13 — ParticleSystem 명시 Play - foreach (var ps in extraFx.GetComponentsInChildren(true)) ps.Play(true); + foreach (var ps in extraFx.GetComponentsInChildren(true)) { var m = ps.main; m.scalingMode = ParticleSystemScalingMode.Hierarchy; ps.Play(true); } AutoDestroyFx(extraFx, GetFxLifetime(extraFx)); } diff --git a/Assets/Scripts/Skills/Effectors/MeleeAreaSpawner.cs b/Assets/Scripts/Skills/Effectors/MeleeAreaSpawner.cs index 027a97b..631554a 100644 --- a/Assets/Scripts/Skills/Effectors/MeleeAreaSpawner.cs +++ b/Assets/Scripts/Skills/Effectors/MeleeAreaSpawner.cs @@ -41,7 +41,7 @@ namespace EerieVillage.Skills.Effectors // Player 자식 부착 (worldPositionStays=true) 으로 spawn 후에도 Player 이동에 동조. fxGo.transform.SetParent(inventory.transform, true); // PD 지시 2026-05-13 — ParticleSystem 명시 Play - foreach (var ps in fxGo.GetComponentsInChildren(true)) ps.Play(true); + foreach (var ps in fxGo.GetComponentsInChildren(true)) { var m = ps.main; m.scalingMode = ParticleSystemScalingMode.Hierarchy; ps.Play(true); } fxLifetime = GetFxLifetime(fxGo); // PD 지시 2026-05-13 — unscaledTime cap (Time.timeScale=0 영역 잔존 차단) FxAutoDestroyUnscaled.Attach(fxGo, Mathf.Min(fxLifetime + 0.2f, 5f)); diff --git a/Assets/Scripts/Skills/Effectors/PoisonSwampSpawner.cs b/Assets/Scripts/Skills/Effectors/PoisonSwampSpawner.cs index 18e0086..a783f6c 100644 --- a/Assets/Scripts/Skills/Effectors/PoisonSwampSpawner.cs +++ b/Assets/Scripts/Skills/Effectors/PoisonSwampSpawner.cs @@ -53,6 +53,7 @@ namespace EerieVillage.Skills.Effectors // PD 지시 2026-05-13 — ParticleSystem 명시 Play (playOnAwake 영역 정합·재발 안전망) foreach (var ps in swampGo.GetComponentsInChildren(true)) { + var m = ps.main; m.scalingMode = ParticleSystemScalingMode.Hierarchy; ps.Play(true); } } @@ -178,6 +179,7 @@ namespace EerieVillage.Skills.Effectors // PD 지시 2026-05-13 — ParticleSystem 명시 Play (playOnAwake 영역 정합·재발 안전망) foreach (var ps in fx.GetComponentsInChildren(true)) { + var m = ps.main; m.scalingMode = ParticleSystemScalingMode.Hierarchy; ps.Play(true); } FxAutoDestroyUnscaled.Attach(fx, 1.5f); diff --git a/Assets/Scripts/Skills/Effectors/Projectile.cs b/Assets/Scripts/Skills/Effectors/Projectile.cs index 8f59102..51917e5 100644 --- a/Assets/Scripts/Skills/Effectors/Projectile.cs +++ b/Assets/Scripts/Skills/Effectors/Projectile.cs @@ -220,7 +220,7 @@ namespace EerieVillage.Skills.Effectors fx.hideFlags = HideFlags.DontSave; // PD 지시 2026-05-13 — Scene 저장 회피 fx.transform.localScale *= _data.HitFxScale; // PD 지시 2026-05-13 — ParticleSystem 명시 Play - foreach (var ps in fx.GetComponentsInChildren(true)) ps.Play(true); + foreach (var ps in fx.GetComponentsInChildren(true)) { var m = ps.main; m.scalingMode = ParticleSystemScalingMode.Hierarchy; ps.Play(true); } AutoDestroyOnParticleEnd(fx); } diff --git a/Assets/Scripts/Skills/Effectors/ProjectileSpawner.cs b/Assets/Scripts/Skills/Effectors/ProjectileSpawner.cs index d18534c..3e8daee 100644 --- a/Assets/Scripts/Skills/Effectors/ProjectileSpawner.cs +++ b/Assets/Scripts/Skills/Effectors/ProjectileSpawner.cs @@ -43,7 +43,7 @@ namespace EerieVillage.Skills.Effectors var castFx = Object.Instantiate(data.CastFxPrefab, playerTransform.position, Quaternion.Euler(0f, 0f, castAngle)); castFx.hideFlags = HideFlags.DontSave; castFx.transform.localScale *= data.HitFxScale; - foreach (var ps in castFx.GetComponentsInChildren(true)) ps.Play(true); + foreach (var ps in castFx.GetComponentsInChildren(true)) { var m = ps.main; m.scalingMode = ParticleSystemScalingMode.Hierarchy; ps.Play(true); } FxAutoDestroyUnscaled.Attach(castFx, 2f); } @@ -69,7 +69,7 @@ namespace EerieVillage.Skills.Effectors // PD 지시 2026-05-13 — 런타임 spawn 투사체 Scene 저장 회피 (Edit Mode execute 시 잔존 방지) go.hideFlags = HideFlags.DontSave; // PD 지시 2026-05-13 — ParticleSystem 명시 Play (ProjectilePrefab 영역 자체 FX·A08 FX_PinkMagicArrow 등) - foreach (var ps in go.GetComponentsInChildren(true)) ps.Play(true); + foreach (var ps in go.GetComponentsInChildren(true)) { var m = ps.main; m.scalingMode = ParticleSystemScalingMode.Hierarchy; ps.Play(true); } // PD 지시 2026-05-13 — 시각화 ↔ 판정 정합 — BoxCollider2D size = HitboxSize·isTrigger=true. // FX prefab 영역 기존 Collider2D 있으면 size 만 정합·없으면 신규 BoxCollider2D 부착. diff --git a/Assets/Scripts/Skills/Effectors/SpiritFireSpawner.cs b/Assets/Scripts/Skills/Effectors/SpiritFireSpawner.cs index 392faef..7c9a206 100644 --- a/Assets/Scripts/Skills/Effectors/SpiritFireSpawner.cs +++ b/Assets/Scripts/Skills/Effectors/SpiritFireSpawner.cs @@ -27,6 +27,7 @@ namespace EerieVillage.Skills.Effectors // PD 지시 2026-05-13 — ParticleSystem 명시 Play (playOnAwake 영역 정합·재발 안전망) foreach (var ps in shieldGo.GetComponentsInChildren(true)) { + var m = ps.main; m.scalingMode = ParticleSystemScalingMode.Hierarchy; ps.Play(true); } }