docs: 사용하지 않는 메소드 삭제
This commit is contained in:
@@ -64,28 +64,6 @@ namespace TON
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> 특정 데이터를 JSON 형식으로 저장하는 함수 </summary>
|
|
||||||
public static void SaveToFile<T>(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<T> wrapper = new Wrapper<T> { items = data };
|
|
||||||
json = JsonUtility.ToJson(wrapper, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// 일반 객체는 그대로 JSON 변환
|
|
||||||
json = JsonUtility.ToJson(data, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
File.WriteAllText(path, json);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Application.persistentDataPath 내의 파일 경로 생성성 </summary>
|
/// <summary> Application.persistentDataPath 내의 파일 경로 생성성 </summary>
|
||||||
private static string GetPersistentPath(string fileName)
|
private static string GetPersistentPath(string fileName)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user