I am following the guide here. I’ve successfully added DLLs that are now not giving any compilation errors. However when I try to call code during play-time I am getting warnings saying the DLLs are not present.
[ 00:07:45.784 ]: [Warning] Exception has been thrown. Unable to load one or more of the requested types.
Could not load file or assembly 'MessagePack, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b4a0369545f0a1be'. The system cannot find the file specified.
Stack strace:
at System.Reflection.RuntimeModule.GetTypes(QCallModule module, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeModule.GetDefinedTypes()
at System.Reflection.RuntimeModule.GetTypes()
at BlastNet.Common.INetMessage.RegisterAssembly(Assembly assembly)
at BlastNet.Common.INetMessage.RegisterAllMessages()
at BlastNet.Common.INetMessage.Initialize()
at BlastNet.Common.BlastNetManager.Initialize(Logger logger)
at Game.BlastNetworker.StartNetworker(String address, UInt16 port) in G:\Flax\UMMO\Source\Game\BlastNetworker.cs:line 46
at Game.RealmConnectScreen.OnEnable() in G:\Flax\UMMO\Source\Game\RealmConnectScreen.cs:line 42
at FlaxEngine.Interop.NativeInterop.Invoker.InvokerNoRet0`1.InvokeThunk(Object delegateContext, ManagedHandle instancePtr, IntPtr* paramPtrs) in C:\Users\Wojtek\Flax\FlaxEngine\Source\Engine\Engine\NativeInterop.Invoker.cs:line 301
at FlaxEngine.Interop.NativeInterop.ThunkContext.InvokeThunk(ManagedHandle instanceHandle, IntPtr param1, IntPtr param2, IntPtr param3, IntPtr param4, IntPtr param5, IntPtr param6, IntPtr param7) in C:\Users\Wojtek\Flax\FlaxEngine\Source\Engine\Engine\NativeInterop.cs:line 1840
When I try to add the DLL (MessagePack) to editor as the guide states:
options.ExternalModules.Add(new BuildOptions.ExternalModule(BuildOptions.ExternalModule.Types.CSharp, path));
I get the error:
[ 00:20:56.925 ]: [Info] Exception: Index was outside the bounds of the array.
Stack trace:
[ 00:20:56.928 ]: [Info] at Flax.Build.Builder.BuildTargetNativeCppBindingsOnly(RulesAssembly rules, TaskGraph graph, Target target, Dictionary`2 buildContext, Platform platform, TargetArchitecture architecture, TargetConfiguration configuration, Boolean skipBuild) in C:\Users\Wojtek\Flax\FlaxEngine\Source\Tools\Flax.Build\Build\NativeCpp\Builder.NativeCpp.cs:line 1073
at Flax.Build.Builder.BuildTargets() in C:\Users\Wojtek\Flax\FlaxEngine\Source\Tools\Flax.Build\Build\Builder.cs:line 350
at Flax.Build.Program.Main() in C:\Users\Wojtek\Flax\FlaxEngine\Source\Tools\Flax.Build\Program.cs:line 152
This may be the result of MessagePack using dynamic code generation though I thought that wouldn’t be the case as Flax uses NET 8.0 compared to something much lower like Unity.
Either way, I’d love to know what I am doing wrong or what limitation I am up against. Thanks so much~