public override void Show() { base.Show(); matchesList.Clear(); string fullDirectoryPath = Application.dataPath + "/" + matchDataFolder; matchNotFound.SetActive(true); try { DirectoryInfo matchDataInfo = new DirectoryInfo(fullDirectoryPath); //Debug.Log(fullPath); if (matchDataInfo != null) { FileInfo[] matchFiles = matchDataInfo.GetFiles(); foreach (FileInfo fileInfo in matchFiles) { if (fileInfo.Extension.ToLower() == ".json") { matchNotFound.SetActive(false); matchesList.AddItem(fileInfo.Name, delegate() { if (matchPlayerController.LoadJSON(fileInfo.FullName)) { if (rightPanelManager && matchPlayerPanelController) { rightPanelManager.ShowPanel(matchPlayerPanelController); if (currentMatchButtonContainer) { currentMatchButtonContainer.SetActive(true); } } } }); } } matchesList.RefreshList(); } } catch (Exception ex) { } }
void OnDisable() { haveGeneral = false; generalsList.Clear(); }
void OnDisable() { havePrison = false; prisonerList.Clear(); }
void OnDisable() { generalsList.Clear(); }
void OnDisable() { generalsInfoList.Clear(); objsList.Clear(); }
void OnDisable() { kingList.Clear(); }
void OnDisable() { targetList.Clear(); }
public void SetList(ref T[] contentList) { controller.Clear(); controller.AddItems(contentList); }