Unity Transport for a Unity-less server

As I understand, right now Unity transport can’t be used to connect to a unity-less server. Is there a plan to enable this? I have to stick to LiteNetLib until then…

The new Unity transport uses UDP sockets, you can use whatever network library you want as server as long as its UDP and you implement the same network protocol on top of that.

Plus you can even switch out NetworkInterfaces in the Unity Transport package, which means you can implement an INetworkInterface which uses LiteNetLib. Then you create your driver like this m_Driver = new NetworkDriver(new TestNetworkInterface()); and unity will also use LiteNetLib if you want to use it for the client and server.

Well, that’s the whole point of it. There is a lot of stuff in Unity transport implemented on top of UDP sockets, namely the protocol itself, connection state machine, the pipelines (compression, sequencing, etc…). I’m interested in having all of that in a unity client but also connect to a unity-less server.

Then take a look at the UdpCHeader struct, its a 4 byte struct that contains the header, then just add your data behind the header, should be pretty simple as long as you don’t use pipelines.
If your network library is doing something like packet fragmentation etc. then you need to implement your own INetworkInterface to handle this or just copy the BaselibNetworkInterface and add support for that, or you deactivate such functionality on the server network library.