RegisterCallFunctionByNameWithArgumentsPreHook

This registers a callback that will get called before UObject::CallFunctionByNameWithArguments is called.

Parameters (except strings & bools & FOutputDevice) must be retrieved via Param:Get() and set via Param:Set().

If the callback returns nothing (or nil), the original return value of CallFunctionByNameWithArguments will be used.

If the callback returns true or false, the supplied value will override the original return value of CallFunctionByNameWithArguments.

Parameters

#TypeInformation
1functionThe callback to register

Callback Parameters

#TypeInformation
1UObjectThe object context
2stringThe string
3FOutputDeviceThe AR
4UObjectThe executor
5boolThe bForceCallWithNonExec value

Callback Return Value

#TypeInformation
1boolWhether to override the original return value of CallFunctionByNameWithArguments

Example

local function MyCallback(Context, Str, Ar, Executor, bForceCallWithNonExec)
    -- Do something with the parameters
    -- Return nil to use the original return value of CallFunctionByNameWithArguments
    -- Return true or false to override the original return value of CallFunctionByNameWithArguments

    return nil
end

RegisterCallFunctionByNameWithArgumentsPreHook(MyCallback)