We’re making use of Burst-compiled FunctionPointers, however we are frequently and randomly getting errors when building the application that complain with the following error:
Unable to resolve the definition of the method Techblox.Serialization.Generic.SerializeComponentFunctionDelegate.Invoke(Svelto.ECS.EGID& modreq(System.Runtime.InteropServices.InAttribute), System.IntPtr& modreq(System.Runtime.InteropServices.InAttribute), Svelto.ECS.DataStructures.NativeDynamicArrayCast
1<System.Byte>& modreq(System.Runtime.InteropServices.InAttribute), ref uint)`
The FunctionPointer is defined to use the following delegate:
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void SerializeComponentFunctionDelegate(in EGID egid, in IntPtr mapperPtr,
in NativeDynamicArrayCast<byte> serializationData, ref uint dataPos);
It’s not clear whether there is anything in our set-up that is wrong, however the fact the error randomly shows up and we do not have any runtime errors from this code leads me to believe that it is an error in the Burst compiler. I’m unsure what information would be most useful to identify the actual problem, so please let me know if there’s anything else I can show or explain to help.