UnhookMultiple(function, handle, handle)
Description
Section titled âDescriptionâThe UnhookMultiple Lua function unhooks multiple hooks based on an input. This input acts like a filter to identify all the hooks that should be unhooked.
The DumpAllHooks function can be used to list all the existing hooks in the system.
Arguments
Section titled âArgumentsâ- Function or nil:
This must be the name of a triggered function or nil. - Handle or nil:
This must be the handle for the target object or nil. - Handle or nil:
The must be the handle for the context object or nil.
The target and context names can be seen using the DumpAllHooks function.
- Integer:
The function returns an integer indicating how many hooks were unhooked.
![]() | Hint: |
| See also these related functions: DumpAllHooks, HookObjectChange, Unhook. |
Example
Section titled âExampleâThis example unhooks all hooked related to the function created in the example for the HookObjectChange - please run the example from that topic before running this one.
| Copy CodeLua |
| ``` |
| return function () |
-- Unhooks all hooks related to the "MySequencePoolCallback" function.local amount = UnhookMultiple(MySequencePoolCallback)-- Print how many hooks that were unhooked.Printf(amount .. " hook(s) were unhooked.")end
