RegisterCustomEvent
注册一个回调,在调用名为 EventName 的蓝图函数或事件时执行。
参数
| # | 类型 | 说明 |
|---|---|---|
| 1 | string | 要挂钩的事件名称。 |
| 2 | function | 事件被调用时要执行的回调。 |
示例
RegisterCustomEvent("MyCustomEvent", function()
print("MyCustomEvent was called\n")
end)
原文:docs/lua-api/global-functions/registercustomevent.md · 固定提交 560411f18512 · 来源与 MIT 许可