Пример #1
0
        private void SetUpClientConnectCallback()
        {
            NetworkChannel.OnClientConnect((client) =>
            {
                clients.Add(client);
                OnClientConnectHandler?.Invoke(client);
            });

            NetworkChannel.OnClientDisconnect((client) =>
            {
                clients.Remove(client);
                onClientDisconnectHandler?.Invoke(client);
            });
        }