private void InitMapList() { foreach (string mapName in mapSaver.ListOfMaps(true)) { GameObject nameObj = GameObjectUtil.Instantiate(mapNameObj, Vector3.zero, transform); nameObj.transform.localScale = Vector3.one; nameObj.GetComponent <Text>().text = mapName.Substring(mapSaver.GetFilePath(true).Length); nameObj.GetComponent <MapListElement>().Init(); } }
private bool IsMapExist(string mapName) { string[] mapList = mapSaver.ListOfMaps(true, false); for (int i = 0; i < mapList.Length; i++) { if (mapList[i].Equals(mapName)) { return(true); } } return(false); }