Hi!
I need a console / windows service application for hosting the network communication and a mysql database for my current project. The current network stack is created with Lidgren Network, but I try to switch to new Unity Networking.
It’s possible to create a console application with the NetworkServer?
I try the following:
- Create new Console Application
- Link UnityEngine and UnityEngine.Networking to the references
- Start the Server with: NetworkServer.Listen(4444);
But if I start the Console App I get the following Exception:
“An unhandled exception of type ‘System.Security.SecurityException’ occurred in UnityEngine.Networking.dll
Additional information: ECall methods must be packaged into a system module.
at UnityEngine.Networking.NetworkTransport.Init()
at UnityEngine.Networking.NetworkServer…ctor()
at UnityEngine.Networking.NetworkServer.get_instance()
at UnityEngine.Networking.NetworkServer.Listen(Int32 serverPort)
at Server.Program.Main(String[ ] args) in D:\dev\Tests\DedicatedServerTest\Server\Program.cs:line 13
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[ ] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()”
There are plans to allow creating own seperate Server for Unity Networking?
Thanks!