From 99d745a490a481c58682071973432cbdf698d05b Mon Sep 17 00:00:00 2001 From: "aube.lee" Date: Sun, 9 Mar 2025 20:51:23 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=EC=82=AC=EC=9A=A9=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8A=94=20=EB=A9=94=EC=86=8C=EB=93=9C=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Gameton/Scripts/Common/JSONLoader.cs | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/Gameton-06/Assets/Gameton/Scripts/Common/JSONLoader.cs b/Gameton-06/Assets/Gameton/Scripts/Common/JSONLoader.cs index f7c3a723..b12f7b68 100644 --- a/Gameton-06/Assets/Gameton/Scripts/Common/JSONLoader.cs +++ b/Gameton-06/Assets/Gameton/Scripts/Common/JSONLoader.cs @@ -64,28 +64,6 @@ namespace TON } } - /// 특정 데이터를 JSON 형식으로 저장하는 함수 - public static void SaveToFile(T data, string fileName) - { - string path = $"Assets/Gameton/Resources/{DATA_PATH}{fileName}.json"; - string json; - - // [리스트] 형식인지 확인 - if (typeof(T).IsGenericType && typeof(T).GetGenericTypeDefinition() == typeof(List<>)) - { - // 리스트 데이터를 감싸는 래퍼 클래스를 사용하여 JSON 변환 - Wrapper wrapper = new Wrapper { items = data }; - json = JsonUtility.ToJson(wrapper, true); - } - else - { - // 일반 객체는 그대로 JSON 변환 - json = JsonUtility.ToJson(data, true); - } - - File.WriteAllText(path, json); - } - /// Application.persistentDataPath 내의 파일 경로 생성성 private static string GetPersistentPath(string fileName) {