From a2796087f14492abc8f78f664417cecc23621c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=8C=90=EB=8F=8C?= Date: Fri, 6 Jun 2025 23:19:52 +0900 Subject: [PATCH] =?UTF-8?q?Excel=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/1_Script/System/Excel.cs | 26 +++++++++----------------- Assets/1_Script/System/GameManager.cs | 8 ++++++-- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/Assets/1_Script/System/Excel.cs b/Assets/1_Script/System/Excel.cs index 5dad7ad..eb440a2 100644 --- a/Assets/1_Script/System/Excel.cs +++ b/Assets/1_Script/System/Excel.cs @@ -8,17 +8,6 @@ public class Excel private List datas; public List getDatas { get { return datas; } } - // Á»´õ °íµµÈ­°¡ ÇÊ¿äÇÔ. - //public Sheet findSheet(string sheetName) { - // int index = datas.FindIndex(n => n.name == sheetName); - // if(index == -1) - // { - // Debug.Log("null exception"); - // return null; - // } - // return datas[index]; - //} - #region Dynamic //ÀÌ·¯ÇÑ ÇüÅ·Π»ç¿ëÇÒ°Í public Dynamic dynamic; @@ -57,12 +46,11 @@ public class Excel } #endregion - public Excel() + public Excel(List fileNames) { ExcelManager excel = new ExcelManager(); - - //Dynamic, Unit - excel.Add("Datas.xlsx"); + + excel.Add(fileNames); datas = excel.Play(); @@ -116,9 +104,13 @@ public class Excel _sheets = new List(); readList = new List(); } - public void Add(string file) + + public void Add(List files) { - readList.Add(path + file); + foreach (string file in files) + { + readList.Add(path + file); + } } public List Play() diff --git a/Assets/1_Script/System/GameManager.cs b/Assets/1_Script/System/GameManager.cs index 87db28d..fa3e091 100644 --- a/Assets/1_Script/System/GameManager.cs +++ b/Assets/1_Script/System/GameManager.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using System.Collections.Generic; +using UnityEngine; using UnityEngine.SceneManagement; public class GameManager : DontDestroy @@ -11,7 +12,10 @@ public class GameManager : DontDestroy { Application.targetFrameRate = 120; nowScene = eScene.Title; - excel = new Excel(); + //Datas.xlsx + // Dynamic + // Unit + excel = new Excel(new List() {"Datas.xlsx"}); //사용법 //Debug.Log(excel.dynamic.selectVelue("maxSwingCount"));