void Awake() { map = GameObject.Find("Map"); terrains = GameObject.Find("Terrains"); meshRenderer = map.GetComponent <MeshRenderer>(); list = new List <MapConfig>(); TextAsset obj = (TextAsset)AssetDatabase.LoadAssetAtPath("Assets/Game/Config/stage_map.csv", typeof(TextAsset)); string text = obj.text; StringReader stringReader = new StringReader(text); stringReader.ReadLine(); stringReader.ReadLine(); while (true) { string line = stringReader.ReadLine(); if (line == null) { break; } string[] csv = line.Split(';'); if (csv.Length != 0 && !string.IsNullOrEmpty(csv[0])) { MapConfig mapConfig = new MapConfig(); mapConfig.ParseCsv(csv, false); list.Add(mapConfig); } } index = 0; StartCoroutine(Doing()); }