This commit is contained in:
brausjonas
2023-04-10 15:38:01 +02:00
parent e60b637e20
commit 1435baa2e5
8 changed files with 6 additions and 2 deletions
@@ -94,15 +94,18 @@ public class StartHandler : MonoBehaviour
Stream stream = client.GetStream();
byte[] readMessage = new byte[10];
stream.Write(new byte[]{4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0});
stream.Write(new byte[]{4, 0, 0, 0, 0, 0, 0, 0, 0, 0});
stream.Read(readMessage, 0, 10);
string s = Encoding.ASCII.GetString(readMessage);
Debug.Log(s);
PlayerPrefs.SetString("roomcode", s);
PlayerPrefs.Save();
SceneManager.LoadScene(1, LoadSceneMode.Single);
stream.Close();
}
public void ButtonJoin()