# v0.1.265 — QA-048 Duplicate 오프셋 누적

- 버전: v0.1.265
- 분류: 48th stable seal (v0.1.366) 일괄 봉인 사이클
- 다운로드: [factory00-windows-x64-v0.1.265.zip](../../downloads/archive/factory00-windows-x64-v0.1.265.zip) (archive 보존)
- 캡처: [qa-screenshots/v0.1.265/](../../qa-screenshots/v0.1.265/)

---

## 협업자 PM 회신
QA-048 [P2] — 반복 Duplicate 시 동일 오프셋 위치 겹침. PM 요청: 매 복제마다 offset 가산.

## root cause
DuplicateCommand.Execute() L6968:`csharp_duplicateGo.transform.position = origGo.transform.position + origGo.transform.right * 50f;
`원본 기준 항상 +50mm -> N회 복제 -> 모두 같은 위치 겹침.

## fix — origId 카운터 누적
`csharpDictionary _duplicateCount = new();   // 세션 동안 유지// DuplicateCommand.Execute() 안
int dupCount = 1;
string origId = _original.id ?? "";
if (!string.IsNullOrEmpty(origId)) {
    _host._duplicateCount.TryGetValue(origId, out dupCount);
    dupCount++;
    _host._duplicateCount[origId] = dupCount;
}
_duplicateGo.transform.position = origGo.transform.position + origGo.transform.right * (50f * dupCount);
`| 복제 횟수 | 오프셋 |
|---|---|
| 1회 | +50mm |
| 2회 | +100mm |
| 3회 | +150mm |
| ... | ... |
원본 기준 누적 (체이닝 아님 — 협업자 spec "원본 위치 + offset(N)" 패턴).

## .twn 로드 시 reset
ClearAllRuntimeComponents() 안 _duplicateCount?.Clear() 추가. 새 .twn 로드 시 카운터 초기화.
## 변경 파일
- Assets/Scripts/Game/Factory00Bootstrap.cs (+10라인) — _duplicateCount Dictionary + DuplicateCommand 오프셋 누적 + ClearAllRuntimeComponents reset- ProjectSettings/ProjectSettings.asset — bundleVersion 0.1.264 -> 0.1.265
## 검증 시나리오
1. 부품 선택 -> Ctrl+D 1회 -> +50mm 우측
2. 동일 원본 -> Ctrl+D 2회 -> +100mm 우측 (이전 복제본과 +50mm 차이)
3. Ctrl+D 3회 -> +150mm 우측
4. 다른 원본 선택 -> Ctrl+D 1회 -> +50mm (origId별 독립 카운터)
5. New 또는 .twn 로드 -> 카운터 reset -> +50mm 부터 다시 시작
6. Undo (Ctrl+Z) -> 복제본 사라짐 (카운터는 유지 — 사용자 의도 모호하므로 보수적)

## 다음 사이클
- v0.1.266 — QA-064 (복제 후 원본 click 시 복제본 선택 오동작) + QA-049 (Esc 충돌)- v0.1.267 — QA-042 카메라 속도 설정 / QA-043 투명 실제 적용- v0.1.268 — QA-014 (PM 회신)협업자 git origin/main = local.


---

## 봉인 참조

본 사이클은 **48th stable seal (v0.1.366, 2026-05-24)** 일괄 봉인에 포함됨.

- journal: [2026-05-24-v0.1.298-366-48th-stable-seal.md](../../journal/2026-05-24-v0.1.298-366-48th-stable-seal.md)
- alias zip: [factory00-windows-x64-v0.1.366-stable.zip](../../downloads/factory00-windows-x64-v0.1.366-stable.zip) (170 MB)
