Method GetFunctionDelegate
GetFunctionDelegate<T>(String)
Gets a delegate for the native compiled function in the engine
Declaration
public T GetFunctionDelegate<T>(string name)
Parameters
public T GetFunctionDelegate<T>(string name)
String | name | Name of the function to get the delegate for |
Returns
T | Callable delegate for the function or null if not found |
Type Parameters
T | Type of the delegate to retrieve |
Implements
Remarks
The type T
must be a delegate that matches the signature of the actual
function. The delegate should also have the UnmanagedFunctionPointerAttribute to indicate the
calling convention and other marshaling behavior for the function.
warning
Neither the signature nor the presence of the UnmanagedFunctionPointerAttribute is validated by this method. It is up to the caller to provide an appropriate delegate for the function defined in the engine. Incorrect delegates could lead to instabilities and application crashes.