diff --git a/Assets/Scripts/Mechanics/GameOptimizer.cs b/Assets/Scripts/Mechanics/GameOptimizer.cs index 32d5b70..9541234 100644 --- a/Assets/Scripts/Mechanics/GameOptimizer.cs +++ b/Assets/Scripts/Mechanics/GameOptimizer.cs @@ -31,6 +31,8 @@ namespace Platformer.Mechanics [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] static void SetupJumpThroughPlatforms() { + // BT5-Dev #28 — Tilemap 영역 포함 모든 일반 Collider Layer 8 변환. + // Drop-Through 표준 패턴 = 모든 발판·지면이 Layer 8. PlatformDropThrough Raycast가 하강 시 충돌 활성 = 착지. int applied = 0, excluded = 0; var allColliders = Object.FindObjectsByType(FindObjectsSortMode.None); var appliedNames = new System.Collections.Generic.List(); @@ -38,7 +40,6 @@ namespace Platformer.Mechanics { if (c == null) continue; if (c.isTrigger) { excluded++; continue; } - if (c.GetComponent() != null) { excluded++; continue; } if (c.GetComponent() != null || c.GetComponent() != null || c.GetComponent() != null @@ -50,18 +51,18 @@ namespace Platformer.Mechanics continue; } - // PlatformEffector2D 잔존 영역 제거 (BT25 누적 영향 차단) + // PlatformEffector2D 잔존 제거 (BT25 누적 영향 차단) var effector = c.GetComponent(); if (effector != null) Object.Destroy(effector); c.usedByEffector = false; - // Layer 8 변환 → IgnoreLayerCollision로 기본 통과 + // Layer 8 변환 → IgnoreLayerCollision 기본 통과 + PlatformDropThrough Raycast 착지 c.gameObject.layer = 8; applied++; if (appliedNames.Count < 8) appliedNames.Add($"{c.gameObject.name}({c.GetType().Name})"); } - Debug.Log($"[BT27-JumpThrough] applied={applied} excluded={excluded} total={allColliders.Length}"); - Debug.Log($"[BT27-JumpThrough] appliedSamples=[{string.Join(", ", appliedNames)}]"); + Debug.Log($"[BT28-JumpThrough] applied={applied} excluded={excluded} total={allColliders.Length}"); + Debug.Log($"[BT28-JumpThrough] appliedSamples=[{string.Join(", ", appliedNames)}]"); } } } diff --git a/Assets/Scripts/Mechanics/PlatformDropThrough.cs.meta b/Assets/Scripts/Mechanics/PlatformDropThrough.cs.meta new file mode 100644 index 0000000..8725e6b --- /dev/null +++ b/Assets/Scripts/Mechanics/PlatformDropThrough.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: bc0df74503a03ee478bb504a5cd1b0c3 \ No newline at end of file