Skip to content

BUG:偶现Lua函数绑定到蓝图Delegate时报错 #766

@BoilTask

Description

@BoilTask

提示签名不匹配,报错日志:

[2026.04.10-18.31.31:066][777]LogUnLua: Error: Lua error message: [string "D:/ProjectAir/Content/Script/UI/Item/WBP_TipsTileView.lua"]:118: delegate handler signatures are not compatible
stack traceback:
        [C]: in method 'Add'
        [string "D:/ProjectAir/Content/Script/UI/Item/WBP_TipsTileView.lua"]:118: in function 'UI.Item.WBP_TipsTileView.OnContainerEntryGenerated'

可以确定就以下,一处绑定逻辑(一一对应),并不会试图把多个Lua函数绑定到同一个Delegate上。

function M:OnContainerEntryGenerated(widget)
    if widget.OnClicked ~= nil then
        widget.OnClicked:Add(self, self.OnWidgetClick)
    end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions