Unity delay in sending the current value when using sockets

前端 未结 2 1936
故里飘歌
故里飘歌 2021-01-15 17:08

The client.cs in Visual Studio.

private void SendToServer(string HeartRate)
    {
        SetHRTest(HeartRate);
        try
        {
            s = client.         


        
2条回答
  •  情话喂你
    2021-01-15 17:30

    I think it's the fact that you put all the server stuff in the Update. Which means it'll get called every frame. Which is a lot.

    You should probably put all this in a separate method and call that from the client.

提交回复
热议问题