fix(deck): UIGroup 분리 후 화면 표시 복구 (그룹 활성화 + .Enable 토글 ClientOnly + 부트 폴링)

메이커가 UI를 6개 UIGroup으로 분리하면서 발생한 2개 버그(시작이 MainMenu가
아니라 로비·NPC 상호작용 무반응) 근본 수정. 메이커 MCP 플레이테스트로 확정:
- 원인1: 새 UIGroup(Select/Lobby/Run/Deck)이 DefaultShow=false라 시작 시 비활성.
  → ActivateUIGroups(ClientOnly)로 그룹 :SetEnable(true) 활성화.
- 원인2: 컨트롤러의 중첩 self:SetEntityEnabled(.Enable 토글)가 비-DefaultGroup
  스코프를 잃음(ExecSpace 6 RPC 재디스패치). → SetEntityEnabled를 ClientOnly(2)로
  바꿔 인라인 실행 → 모든 UIGroup 해석. (.Text/RectSize/ImageRUID 등 다른 속성은
  중첩에서도 정상이라 SetText/SetHpBar는 무변경.)
- 원인3: OnBeginPlay가 UI 로드 전 실행 → DeckUIGroup 로드까지 폴링 후
  ActivateUIGroups + ShowMainMenu.

검증(플레이테스트): 부트→MainMenu·시작→로비+LobbyUIGroup·run NPC→charselect 전부 정상.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-17 08:15:44 +09:00
parent a917a6d82b
commit afac34d7b5
3 changed files with 21 additions and 2 deletions

View File

@@ -10,7 +10,18 @@ ${luaCharsTable()}
${luaSoulShopTable(SOUL_UNLOCKS)}
self.SoulUnlocks = {}
self.SoulPoints = self.SoulPoints or 0
local uiTries = 0
local uiInit = 0
uiInit = _TimerService:SetTimerRepeat(function()
uiTries = uiTries + 1
if _EntityService:GetEntityByPath("/ui/DeckUIGroup") ~= nil then
self:ActivateUIGroups()
self:ShowMainMenu()
_TimerService:ClearTimer(uiInit)
elseif uiTries > 80 then
_TimerService:ClearTimer(uiInit)
end
end, 0.1)
local lp = _UserService.LocalPlayer
if lp ~= nil then
self:ReqLoadAscension(lp.PlayerComponent.UserId)

View File

@@ -66,5 +66,5 @@ if e ~= nil then
end`, [
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' },
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'enabled' },
]),
], 2),
];

View File

@@ -21,6 +21,14 @@ self:SetEntityEnabled("/ui/DeckUIGroup/DeckAllHud", false)
self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", false)
self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false)
self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)`),
method('ActivateUIGroups', `local function grp(n)
local g = _EntityService:GetEntityByPath("/ui/" .. n)
if g ~= nil then g:SetEnable(true) end
end
grp("SelectUIGroup")
grp("LobbyUIGroup")
grp("RunUIGroup")
grp("DeckUIGroup")`, [], 2),
method('ShowState', `self:HideGameHud()
self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", state == "menu")
self:SetEntityEnabled("/ui/SelectUIGroup/CharacterSelectHud", state == "charselect")