First off, I want to say I’ve been keeping an eye on the C# 9 function pointers, and I really appreciate the efforts the scripting team has made so far with its support. I was excited to use them in Burst with the hope that they can be used to overcome the generic delegate limitation when using FunctionPointer in non-bursted code.
Currently running Unity 2021.2.0a13 with Burst 1.6.0-pre.2, I am running into
```Burst error BC1054: Unable to resolve type `method System.Int32 *(System.Int32). Reason: Unknown.````
Here’s a snip of the failing Job:
[BurstCompile]
public unsafe struct CallFuncJob : IJob
{
[NativeDisableUnsafePtrRestriction]
public IntPtr FuncPtr;
public NativeArray<int> In;
public NativeArray<int> Out;
public void Execute()
{
Out[0] = ((delegate* unmanaged[Cdecl]<int, int>)FuncPtr)(In[0]);
}
}