oth. get_root_callback Synchronous
Get the original function bridge from inside an OTH callback. Call it when you need to bypass every installed hook layer.
Luau
oth.get_root_callback() -> Function?Parameters
This function takes no arguments.
Returns
Function?The original callable inside an OTH hook thread, or nil outside one.
Usage notes
Unlike the callable returned by oth.hook, the root callback skips the complete OTH chain.
Example
Luau
local target = newcclosure(function(value) return value * 2 end)
local previous
previous = oth.hook(target, function(value)
local root = oth.get_root_callback()
return root(value) + 1
end)
print(target(3)) -- 7
oth.unhook(target, previous)