public void SendWelcomeReceivedPacket() { Action action = () => { const ClientPacketType clientPacketType = ClientPacketType.WelcomeReceived; Packet packet = new Packet((int)clientPacketType); packet.Write(connectionToServer.myPlayerId); packet.Write(mainMenuGamePhase.mainMenu.userNameField.text); packet.Write(GameConfiguration.ApiVersion); connectionToServer.SendTcpPacket(clientPacketType, packet); }; networkSimulation.SendThroughNetwork(action); }