CharFileInfoCustomFemale GetCharCustom() { CharFileInfoCustomFemale charCustomFile = null; CharaList operatingList = listFemales.gameObject.activeInHierarchy ? listFemales.gameObject.GetComponent <CharaList>() : null; if (operatingList != null) { CharaFileSort charaFiles = (CharaFileSort)operatingList.GetType() .GetField("charaFileSort", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(operatingList); if (System.IO.File.Exists(charaFiles.selectPath) && charaFiles.selectPath != null) { CharFemaleFile charPNG = new CharFemaleFile(); charPNG.Load(charaFiles.selectPath, true, true); charCustomFile = charPNG.femaleCustomInfo; } return(charCustomFile); } return(charCustomFile); }
void Delete() { CharaList operatingList = mainCanvas.Find("01_Add/00_Female").gameObject.activeInHierarchy ? listFemale : mainCanvas.Find("01_Add/01_Male").gameObject.activeInHierarchy ? listMale : null; if (operatingList != null) { CharaFileSort charaFiles = (CharaFileSort)operatingList.GetType() .GetField("charaFileSort", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(operatingList); if (System.IO.File.Exists(charaFiles.selectPath) && charaFiles.selectPath != null) { var sortType = charaFiles.sortKind; mainCanvas.gameObject.SetActive(false); System.IO.File.Delete(charaFiles.selectPath); operatingList.InitCharaList(true); operatingList.OnSort(sortType); mainCanvas.gameObject.SetActive(true); } } }