Not Closing Rooms Fix

This commit is contained in:
brausjonas
2023-04-01 15:02:44 +02:00
parent 52fa2643db
commit 42c6d0ac6a
11 changed files with 213 additions and 62 deletions
@@ -111,6 +111,13 @@ public class StartHandler : MonoBehaviour
public void ButtonBack()
{
client.Close();
client = new TcpClient("185.245.96.48", 8051);
Stream stream = client.GetStream();
stream.Write(new byte[]{3, 0, 0, 0, 0, 0, 0, 0, 0, 0});
byte[] roomCode = Encoding.ASCII.GetBytes(PlayerPrefs.GetString("roomcode"));
stream.Write(roomCode);
SceneManager.LoadScene(0, LoadSceneMode.Single);
}