hookfunction, returning it to its original behavior.
Also registered as restorefunc.
Parameters
function
required
The hooked function to restore.
Behavior
- Restoring a function that is not hooked is a no-op. It does not error.
- After restoring,
isfunctionhookedreportsfalsefor the function. - If the function was hooked as part of a metamethod hook,
restorefunctionalso resolves that case, so you do not need to track which path installed it.
Example
Errors
Related
hookfunction: install the hook this undoes.isfunctionhooked: check hook state.