using System.Collections; using System.Collections.Generic; using System.Threading; using UnityEngine; using UnityEngine.UI; public class CreateRoomController : MonoBehaviour { public string serverIP; public int port; public InputField roomField; public bool isLinkAgain = false; private async void Awake() { try { isLinkAgain = true; await SyncCreateRoom.StartLinkTCPServer(serverIP, port); } catch (System.Exception e) { if (isLinkAgain) { Awake(); } Debug.Log(e.ToString()); } } // Start is called before the first frame update private void Start() { } // Update is called once per frame void Update() { } public async void OnCreateRoom() { } private void OnDisable() { SyncCreateRoom.CloseClint(); isLinkAgain = false; } }