user1542043226  2026-8-10 10:36:20 | 多端版本|
2 11

3

回帖

268

金币

143

积分

积分
143
发表于 5 小时前 | 显示全部楼层 |阅读模式

马上注册,下载996引擎,与更多游戏开发者交流。

您需要 登录 才可以下载或查看,没有账号?注册

×
[GUI ERROR] GUIayout_Create ID is exists Panel_1



stack traceback:
        [string "scripts/GUI/GUI.lua"]: in function 'Layout_Create'
        [string "local ui = {}..."]:36: in function <[string "local ui = {}..."]:6>
        [string "scripts/GUI/GUI.lua"]: in function 'LoadExport'
        [string "GUILayout/custom/gmlib/UILib.lua"]:12: in function 'loadExport'
        [string "GUILayout/custom/module/Main/主界面顶部.lua"]:59: in function 'initUI'
        [string "GUILayout/custom/module/Main/主界面顶部.lua"]:411: in function <[string "GUILayout/custom/module/Main/ 主界面顶部.lua"]:409>
        [C]: in function 'pcall'
        [string "GUILayout/custom/manager/EventManager.lua"]:26: in function '_pushEvent'
        [string "GUILayout/custom/manager/EventManager.lua"]:47: in function 'push'
        [string "GUILayout/custom/gmevent/GMEvent.lua"]:9: in function <[string "GUILayout/custom/gmevent/GMEvent.lua"]:8>
        [string "scripts/GUI/SLMain.lua"]: in function 'onLUAEvent'
        [string "scripts/GUI/SL.lua"]: in function 'onLUAEvent'
        [string "GUILayout/custom/init.lua"]:82: in function ''
        [string "scripts/util/util.lua"]: in function <[string "scripts/util/util.lua"]:0>

回复

使用道具 举报

3

回帖

268

金币

143

积分

积分
143
 楼主| 发表于 4 小时前 | 显示全部楼层

function Main_Top:initUI()
    if GMLib:isPC() then
        return
    end
    self:removeNode()

    local parent = UILib:winFindParent(101)
    UILib:loadExport(parent, self.mCfg.loadUIPath)
    local ui = UILib:uiDelegate(parent)
    UILib:setPosition(ui.Node, -14, -46)
    self.parent, self.ui = parent, ui

    self:initMenuState()
    self:refreshButtons()
    self:bindToggleEvent()
end
回复

使用道具 举报

3

回帖

268

金币

143

积分

积分
143
 楼主| 发表于 4 小时前 | 显示全部楼层
--进入游戏世界触发
local function enterWord()
    SLrint("进入游戏世界触发")
    Main_Top:initUI()
end
EventManager:add(EventCfg.LUA_EVENT_ENTER_WORLD, enterWord, Main_Top)
回复

使用道具 举报