Вот код и ошибка:
Код: Выделить всё
using System;
using System.Runtime.InteropServices.JavaScript;
using System.Runtime.InteropServices;
public partial class MyClass
{
[DllImport("enet.dll")]
public static extern int enet_initialize();
[JSExport]
internal static void Test()
{
Console.WriteLine("ENET: " + enet_initialize());//Gives error in runtime
}
}
Код: Выделить всё
Uncaught at MyClass.Test() in F:\TestWASM\TestWASM\Program.cs:line 23
at MyClass.__Wrapper_Test_151838001(JSMarshalerArgument* __arguments_buffer) in F:\TestWASM\TestWASM\Microsoft.Interop.JavaScript.JSImportGenerator\Microsoft.Interop.JavaScript.JSExportGenerator\JSExports.g.cs:line 37
undefined
Подробнее здесь: https://stackoverflow.com/questions/765 ... ebassembly
Мобильная версия