BT5-Dev #53: 자동 분류 카탈로그 8종 확장 — TileFloating* + 배경·건물 7종 (PD 옵션 A1 채택)

PD 결정 (2026-05-07): "PM 권고안대로 해"

근본 원인 (Editor.log 직접 read):
- BT47 정상 시점 [BT47-MoveTiles] moved=1389 = PD 통과 가능 인식 영역
- BT52 보수적 후 [BT52-Classify] floating=122 = TileFloating* 3종만 = 배경·건물 7종 Level 잔존 = 영구 충돌
- PD 보고: "기존과 다르게 레벨 오브젝트가 생성됨·정상적인 플레이가 안 되고 있어"
- = 배경·건물 7종이 BT47 정상 시점 자동 분류된 결과로 추정 (가설)

옵션 A1 카탈로그 8종 SOT (GameOptimizer.cs SetupJumpThroughPlatforms 영역):
1. TileFloating* (3종) — 공중 발판 (Drop-Through):
   - TileFloatingLeftEdge·TileFloatingRightEdge·TileFloatingTileMiddle
2. 배경·건물 (7종 — 자동 Foreground 이동·Drop-Through):
   - ShortBuilding·TallBuilding·MidgroundFiller (건물·배경 채움)
   - cloud·hillside·midground·mountains (배경 Parallax)

Level 잔존 (영구 충돌 또는 자연 통과):
- TileGround·TileGroundDark·TileGroundTop (3종 지면 — 영구 충돌)
- tree·plant·fence·house (4종 None — 자체 통과)

마이그레이션 X (PD 옵션 A 결정 유지 — Foreground 변경 X·위험 최소화).
사후 복원 영역 (BT51 None 처리) 유지.

가설 한계:
- 배경·건물 7종이 PD 의도 발판/통과 영역인지 확증 X (PD 시각 검증 후 정정 가능)
- 가설 실패 시 카탈로그 v1.1 재조정 또는 옵션 A2 (PD 직접 17종 명시) 전환 의무

Debug.Log: [BT53-Classify] moved=N (floating=F decor=D)
본 PM 직접 Editor.log read 의무 (PD 시각 검증 결과 보고 직후).
This commit is contained in:
깃 관리자 2026-05-07 23:06:28 +09:00
parent 77915e21ab
commit 0d6b78cc3a
1 changed files with 20 additions and 12 deletions

View File

@ -80,14 +80,18 @@ namespace Platformer.Mechanics
fgTilemap = foreground.GetComponent<UnityEngine.Tilemaps.Tilemap>(); fgTilemap = foreground.GetComponent<UnityEngine.Tilemaps.Tilemap>();
} }
// BT52-A — 자동 분류 알고리즘 보수적 정정 (PD 옵션 A 채택 2026-05-07). // BT53-A1 — 자동 분류 카탈로그 확장 (PD 옵션 A1 채택 2026-05-07).
// BT47/BT48 임계값(playerY+1.5)·작은 발판(가로≤8+위·아래 빈) 휴리스틱 폐기. // BT52 TileFloating* 단일 매칭 → 8종 카탈로그 확장.
// 근거: Editor.log [BT48-MoveTiles] moved=3524 비정상 (정상 1389 대비 2.5배) // 근거: BT47/BT48 정상 시점(moved=1389)에 PD가 통과 가능 인식한 영역
// = 휴리스틱이 정상 길·배경 벽지까지 자동 Foreground 이동 → "숨겨진 레이어가 정상적인 길을 막고 있어" 근본 원인. // = 배경·건물 7종이 자동 Foreground 이동된 결과로 추정.
// 새 알고리즘: Tile asset 이름 prefix "TileFloating" 3종만 명확한 공중 발판 의도로 자동 분류. // 카탈로그 (자동 Foreground 이동):
// (TileFloatingLeftEdge·TileFloatingRightEdge·TileFloatingTileMiddle — 카탈로그 17종 중 명시적 Floating 의도 3종) // 1. TileFloating* (3종) — 공중 발판
// 그 외 모든 Tile = Level 잔존 (PD Inspector 직접 의도 분류 — 표준 Unity Tilemap 워크플로우). // 2. ShortBuilding·TallBuilding·MidgroundFiller (3종) — 건물·배경 채움
// 마이그레이션 X (PD 옵션 A 결정 — Foreground 변경 X·위험 최소화). // 3. cloud·hillside·midground·mountains (4종) — 배경 (Parallax)
// Level 잔존 (영구 충돌 또는 자연 통과):
// - TileGround·TileGroundDark·TileGroundTop (3종) — 지면 (영구 충돌)
// - tree·plant·fence·house (4종 None) — Tile 자체 None Collider (자연 통과)
// 마이그레이션 X (PD 옵션 A 결정 — Foreground 변경 X·위험 최소화).
var levelGo = GameObject.Find("Level"); var levelGo = GameObject.Find("Level");
if (levelGo != null && fgTilemap != null) if (levelGo != null && fgTilemap != null)
{ {
@ -95,7 +99,7 @@ namespace Platformer.Mechanics
if (levelTilemap != null) if (levelTilemap != null)
{ {
var bounds = levelTilemap.cellBounds; var bounds = levelTilemap.cellBounds;
int movedFloating = 0; int movedFloating = 0, movedDecor = 0;
for (int x = bounds.xMin; x <= bounds.xMax; x++) for (int x = bounds.xMin; x <= bounds.xMax; x++)
{ {
for (int y = bounds.yMin; y <= bounds.yMax; y++) for (int y = bounds.yMin; y <= bounds.yMax; y++)
@ -105,18 +109,22 @@ namespace Platformer.Mechanics
var tileAsset = levelTilemap.GetTile<UnityEngine.Tilemaps.Tile>(pos); var tileAsset = levelTilemap.GetTile<UnityEngine.Tilemaps.Tile>(pos);
if (tileAsset == null) continue; if (tileAsset == null) continue;
string nm = tileAsset.name ?? string.Empty; string nm = tileAsset.name ?? string.Empty;
if (!nm.StartsWith("TileFloating")) continue; bool isFloating = nm.StartsWith("TileFloating");
bool isDecor = nm == "ShortBuilding" || nm == "TallBuilding" || nm == "MidgroundFiller"
|| nm == "cloud" || nm == "hillside" || nm == "midground" || nm == "mountains";
if (!isFloating && !isDecor) continue;
var tile = levelTilemap.GetTile(pos); var tile = levelTilemap.GetTile(pos);
fgTilemap.SetTile(pos, tile); fgTilemap.SetTile(pos, tile);
fgTilemap.SetColliderType(pos, UnityEngine.Tilemaps.Tile.ColliderType.Sprite); fgTilemap.SetColliderType(pos, UnityEngine.Tilemaps.Tile.ColliderType.Sprite);
levelTilemap.SetTile(pos, null); levelTilemap.SetTile(pos, null);
movedFloating++; if (isFloating) movedFloating++;
else movedDecor++;
} }
} }
if (fgTc != null) fgTc.ProcessTilemapChanges(); if (fgTc != null) fgTc.ProcessTilemapChanges();
var lvlTc = levelGo.GetComponent<UnityEngine.Tilemaps.TilemapCollider2D>(); var lvlTc = levelGo.GetComponent<UnityEngine.Tilemaps.TilemapCollider2D>();
if (lvlTc != null) lvlTc.ProcessTilemapChanges(); if (lvlTc != null) lvlTc.ProcessTilemapChanges();
Debug.Log($"[BT52-Classify] floating moved={movedFloating} (Level→Foreground TileFloating* 3종만 / 마이그레이션 X)"); Debug.Log($"[BT53-Classify] moved={movedFloating + movedDecor} (floating={movedFloating} TileFloating* / decor={movedDecor} 배경·건물 7종 / TileGround*+None 잔존)");
} }
} }