Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ExecuteInGameThread

ExecuteInGameThread(fn)

把 fn 排到下一次游戏线程 tick 执行。

在 kmod 里模组脚本本来就跑在游戏线程上,这个函数的用处是推迟:比如不想在当前钩子回调的栈里直接做某件事(例如重建正在触发事件的控件),就把它排到下一个 tick。

参数

#类型说明
1function无参数回调