Struct FunctionPointer<T>
A function pointer that can be used from a Burst Job or from regular C#.
It needs to be compiled through Unity.Burst.BurstCompiler.CompileFunctionPointer``1(``0)
Syntax
public struct FunctionPointer<T> : IFunctionPointer
Type Parameters
Name |
Description |
T |
Type of the delegate of this function pointer
|
Constructors
FunctionPointer(IntPtr)
Creates a new instance of this function pointer with the following native pointer.
Declaration
public FunctionPointer(IntPtr ptr)
Parameters
Type |
Name |
Description |
IntPtr |
ptr |
|
Properties
Invoke
Gets the delegate associated to this function pointer in order to call the function pointer.
This delegate can be called from a Burst Job or from regular C#.
If calling from regular C#, it is recommended to cache the returned delegate of this property
instead of using this property every time you need to call the delegate.
Declaration
Property Value
IsCreated
Whether the function pointer is valid.
Declaration
public bool IsCreated { get; }
Property Value
Value
Gets the underlying pointer.
Declaration
public IntPtr Value { get; }
Property Value
Explicit Interface Implementations
IFunctionPointer.FromIntPtr(IntPtr)
Declaration
IFunctionPointer IFunctionPointer.FromIntPtr(IntPtr ptr)
Parameters
Type |
Name |
Description |
IntPtr |
ptr |
|
Returns
Implements