Open Avatarchik opened 3 months ago
Hi! I am generating the Godot.GD class, but there is an error in 2 functions during generation, how can I fix this? Cannot use 'System.Span' as a type argument Cannot cast expression of type 'object' to type 'Span'
[Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))] internal static void F_BytesToVar(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data) { try { { IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0); object argobj0 = null; ; { argobj0 = argobj0 != null ? argobj0 : StaticTranslate<System.Span<byte>>.Get((int)data, isolate, NativeValueApi.GetValueFromArgument, v8Value0, false); System.Span<byte> arg0 = (System.Span<byte>)argobj0; var result = Godot.GD.BytesToVar (arg0); Puerts.ResultHelper.Set((int)data, isolate, info, result); } } } catch (Exception e) { Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace); } } [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))] internal static void F_BytesToVarWithObjects(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data) { try { { IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0); object argobj0 = null; ; { argobj0 = argobj0 != null ? argobj0 : StaticTranslate<System.Span<byte>>.Get((int)data, isolate, NativeValueApi.GetValueFromArgument, v8Value0, false); System.Span<byte> arg0 = (System.Span<byte>)argobj0; var result = Godot.GD.BytesToVarWithObjects (arg0); Puerts.ResultHelper.Set((int)data, isolate, info, result); } } } catch (Exception e) { Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace); } }
I suggest you temporarily add the APIs involving Span to the generation blacklist.
Hi! I am generating the Godot.GD class, but there is an error in 2 functions during generation, how can I fix this? Cannot use 'System.Span' as a type argument
Cannot cast expression of type 'object' to type 'Span'