Are you separating your client and server code ?

Hey,

Playing around with the new multiplayer (high level) APIs, it feels to me that client & server code are mixed together, which is a bit confusing (to me).

For example - NetworkManager has callbacks for both client and server.

I was wondering if anyone is splitting their code to make a more clear separation between client & server, and if so, what are you doing to achieve it ?

Hi… i am doing this!

Pretty much copying the server init code you have to the client and instead using StartServer using StartClient… when connecting it triggers the logs on the server about not having set a default player prefab but that is about it… nothing else fires… it is all still very confusing…

public class ManagerNetwork : NetworkManager
    {
    private void Start()
        {
        networkAddress = "127.0.0.1";
        networkPort    = 22001;
        maxConnections = 1000;
        sendPeerInfo   = false;

        connectionConfig.AddChannel( QosType.Reliable );

        StartServer( );
       }
   }

I am making very different projects for client and server, as their respective jobs bear little in common. Because of that, I have had to ditch the HLAPI as it requires both client and server to be the same. The LLAPI is working very well, although it could use a few extras to help with things like lag and jitter

I see no reason why this code can’t be seperated… and the LLAPI is not something i want to touch…

You’d have to ask the uNet devs why they have to be the same.

awaits a dev response :slight_smile:

Let’s see now ! @seanr