hook_function
Record calls of any Unreal Engine function with its parameters, cap copied arguments to a set limit, and read the captured events via poll_events.
Instructions
Record every call of a UFunction, with its parameters. Counts as a write.
function is a UFunction path ('/Script/Engine.PlayerController:ClientRestart'). max_args caps how many parameters are copied per call (default 8). Read the calls with poll_events.
The callback copies parameters and the calling object's name and does nothing else. A native hook registers cleanly, but an eval that then CALLS the hooked function crashed the game with an access violation, so read hook output through poll_events and do not call a hooked function from eval_lua in the same session.
Hooking intercepts game code, so it is refused when allow_writes = false. Stop a hook with stop_stream, which unregisters it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | ||
| function | Yes | ||
| max_args | No |