UnregisterHook

UnregisterHook

UnregisterHook 注销为 UFunction 注册的回调。

参数

# 类型 说明
1 string 要挂钩的 UFunction 的完整名称。类型前缀不影响行为。
2 integer 钩子的 PreId
3 integer 钩子的 PostId

示例

local preId, postId = RegisterHook("/Script/Engine.PlayerController:ClientRestart", function()
    print("PlayerController restarted\n")
end)

UnregisterHook("/Script/Engine.PlayerController:ClientRestart", preId, postId)

原文:docs/lua-api/global-functions/unregisterhook.md · 固定提交 560411f18512 · 来源与 MIT 许可