From 4600aea8eaab180d2db524f50ad783cccb747c01 Mon Sep 17 00:00:00 2001 From: "aube.lee" Date: Fri, 31 Jan 2025 14:37:00 +0900 Subject: [PATCH] =?UTF-8?q?JSONLoader=20=EA=B2=BD=EB=A1=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gameton-06/Assets/Gameton/Scripts/Common/JSONLoader.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gameton-06/Assets/Gameton/Scripts/Common/JSONLoader.cs b/Gameton-06/Assets/Gameton/Scripts/Common/JSONLoader.cs index 40ab6987..10d23f79 100644 --- a/Gameton-06/Assets/Gameton/Scripts/Common/JSONLoader.cs +++ b/Gameton-06/Assets/Gameton/Scripts/Common/JSONLoader.cs @@ -7,10 +7,13 @@ namespace TON { public class JSONLoader : MonoBehaviour { + private const string DATA_PATH = "GameData/"; + /// Resources 폴더에서 JSON 파일을 읽어 특정 데이터 타입으로 변환하는 함수 public static T LoadFromResources(string fileName) { - TextAsset jsonFile = Resources.Load(fileName); + string path = DATA_PATH + $"{fileName}"; + TextAsset jsonFile = Resources.Load(path); if (jsonFile != null) { return JsonUtility.FromJson(jsonFile.text);