From 9db9abce35d64184ae9f07d46ed8aa9f8d005cf3 Mon Sep 17 00:00:00 2001 From: swrring Date: Fri, 11 Sep 2026 09:35:07 +0900 Subject: [PATCH] =?UTF-8?q?[WL-815d2]=20=EB=A9=94=EB=89=B4=20=EC=88=A8?= =?UTF-8?q?=EA=B9=80=EC=9D=B4=20=EC=8B=B1=EA=B8=80=ED=84=B4=20Awake=20?= =?UTF-8?q?=EB=A5=BC=20=EB=A7=89=EB=8D=98=20=EB=B2=84=EA=B7=B8:=20activeIn?= =?UTF-8?q?Hierarchy=20=EB=A1=9C=20=ED=8C=90=EC=A0=95=20=C2=B7=20=EB=B9=84?= =?UTF-8?q?=ED=99=9C=EC=84=B1=20=EA=B0=80=EC=A7=80=EB=8A=94=20=EB=AF=B8?= =?UTF-8?q?=EB=A3=A8=EA=B3=A0=20ReassertHide=20=EA=B0=80=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20(#815)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 몹 처치마다 MobActor.Set_Die()(MobActor.cs:444)에서 NullReferenceException 이 났다. 원인 = 프리팹 저장 상태가 비활성인 IngameUIs 가지 아래의 MonsterSimpleInfo 를 스테이지 진입 때 SetActive(false) 해 버려서, 가지가 켜져도 그 노드만 꺼진 채 남아 Awake 가 영영 안 돌고 MonoBehaviourSingletonTemplate.Ins 가 null 로 남은 것. Co-Authored-By: Claude Opus 5 --- Assets/WL/UI/Scripts/StageUiBridge.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Assets/WL/UI/Scripts/StageUiBridge.cs b/Assets/WL/UI/Scripts/StageUiBridge.cs index f1d5eba13..ea81c0488 100644 --- a/Assets/WL/UI/Scripts/StageUiBridge.cs +++ b/Assets/WL/UI/Scripts/StageUiBridge.cs @@ -55,6 +55,8 @@ namespace WL.UI // ── 진단(프로브가 읽는다 · 실측만) ──────────────────────────────────── public static int EnteredSeen, CountdownSeen, StartedSeen, EnemySeen, TimeSeen, ClearedSeen, FailedSeen, ExitedSeen; public static int MenuHideCalls, MenuRestoreCalls, MenuMissing; + /// 가지가 비활성이라 숨김을 미룬 노드 수(WL-815d2 · ReassertHide 가 뒤늦게 끈다). + public static int MenuDeferred; public static int MenuReassertCalls, MenuReassertHits; // 원본이 다시 켠 것을 도로 끈 횟수 public static int RetryCalls, NextCalls, LobbyCalls, RestartCalls; public static string LastLog = ""; @@ -303,7 +305,11 @@ namespace WL.UI { var t = s_hidden[i]; if (t == null) continue; - if (t.gameObject.activeSelf) { t.gameObject.SetActive(false); n++; MenuReassertHits++; } + // 🔴 activeSelf 가 아니라 activeInHierarchy 로 판정한다(WL-815d2). + // 부모 가지가 아직 꺼져 있는 노드를 끄면 그 노드의 Awake 가 영영 안 돌아 + // 싱글턴(MonoBehaviourSingletonTemplate.Ins)이 null 로 남는다. + // 여기서 미루면 가지가 켜지는 순간 Awake 가 돌고, 그 다음 틱에 끈다. + if (t.gameObject.activeInHierarchy) { t.gameObject.SetActive(false); n++; MenuReassertHits++; } } if (n > 0) MenuReassertCalls++; return n; @@ -409,6 +415,7 @@ namespace WL.UI s_hiddenCount = 0; MenuMissing = 0; int hidden = 0; + int deferred = 0; // 가지가 아직 꺼져 있어 미룬 것(WL-815d2) for (int i = 0; i < paths.Length; i++) { if (string.IsNullOrEmpty(paths[i])) continue; @@ -417,10 +424,18 @@ namespace WL.UI s_hidden[s_hiddenCount] = t; s_hiddenPrev[s_hiddenCount] = t.gameObject.activeSelf; s_hiddenCount++; - if (t.gameObject.activeSelf) { t.gameObject.SetActive(false); hidden++; } + // 🔴 WL-815d2 — 켜져 있는 가지의 노드만 끈다(위 ReassertHide 주석 참조). + // 실측: `IngameUIs` 는 프리팹 저장 상태가 비활성이라, 그 아래 + // `MonsterSimpleInfo`(싱글턴)를 여기서 끄면 Awake 가 안 돌고 `Ins` 가 null 로 남아 + // 몹 처치마다 `MobActor.Set_Die()`(MobActor.cs:444)에서 NRE 가 났다. + // 못 끈 것은 `ReassertHide()` 가 가지 활성 뒤에 끈다(= 화면에는 그대로 안 보인다). + if (t.gameObject.activeInHierarchy) { t.gameObject.SetActive(false); hidden++; } + else deferred++; } MenuHideCalls++; + MenuDeferred = deferred; return "메뉴 숨김 — 경로 " + paths.Length + "개 중 찾음 " + s_hiddenCount + " · 실제로 끈 것 " + hidden + + " · 미룸(가지 비활성) " + deferred + " · 못 찾음 " + MenuMissing + (MenuMissing > 0 ? "(마지막 \"" + LastMissingPath + "\")" : ""); }