// Use this for initialization void OnEnable() { serverResponseFinished = false; characterServerResponse = new List <SubPacket>(); CharacterQueryPacket cq = new CharacterQueryPacket(Utils.GetAccountName()); SubPacket sp = cq.BuildQueryPacket(); BasePacket packetToSend = BasePacket.CreatePacket(sp, PacketProcessor.isAuthenticated, false); packetProcessor = GameObject.FindGameObjectWithTag("PacketProcessor").GetComponent <PacketProcessor>(); statusBoxHandler.InstantiateStatusBoxPrefabWithNoMenuLink(MenuPrefabs.StatusBox); StatusBoxHandler.statusText = "Status: Retrieving character list from server"; packetProcessor.SendPacket(packetToSend); StartCoroutine(WaitForServerResponseThenDisplayCharacters()); }
// Use this for initialization void OnEnable() { serverResponseFinished = false; characterServerResponse = new List <SubPacket>(); Debug.Log(Utils.GetAccountName()); CharacterQueryPacket cq = new CharacterQueryPacket(Utils.GetAccountName()); SubPacket sp = cq.BuildQueryPacket(); BasePacket packetToSend = BasePacket.CreatePacket(sp, PacketProcessor.isAuthenticated, false); packetProcessor = GameObject.FindGameObjectWithTag("PacketProcessor").GetComponent <PacketProcessor>(); statusBoxHandler.InstantiateStatusBoxPrefabWithNoMenuLink(MenuPrefabs.StatusBox); StatusBoxHandler.statusText = "Status: Retrieving character list from server"; packetProcessor.SendPacket(packetToSend); StartCoroutine(WaitForServerResponseThenDisplayCharacters()); //send character query packet to server //open status box you cant close until received response from server //receive what characters are avaiable for this account if any //draw them on character select boxes }