This function gives you the Script Function reference for the given method. This can be used to retrieve the original function behind a method bound to an instance or a struct.
When an invalid value is passed (e.g. not a method), this returns undefined.
method_get_index(method);
Argument | Type | Description |
---|---|---|
method | Method | The method variable to check |
var _index = method_get_index(light_setup);
if (_index != undefined)
{
show_debug_message(script_get_name(_index));
}
The above code will get the function index for the method light_setup and then if it is not undefined it will output the function's name to the console.