한글 깨지는거 수정

This commit is contained in:
2026-07-07 14:28:54 +09:00
parent acc55b09d3
commit 86a0f2c8eb
4 changed files with 30 additions and 21 deletions

View File

@@ -78,15 +78,18 @@ public void RecordChoice(string code)
// 이어하기를 만들 때 타이틀 화면 등에서 Load()를 호출하면 된다.
private static string SavePath => Path.Combine(Application.persistentDataPath, "story_state.json");
public void Save() => File.WriteAllText(SavePath, _state.ToJson());
public void CallLoad() => Load();
// 저장 파일이 있으면 불러온다. 성공 여부 반환.
public void Load()
public bool Load()
{
if (!File.Exists(SavePath))
{
Debug.LogWarning("세이브 파일이 없습니다.");
return;
return false;
}
try
@@ -95,17 +98,17 @@ public void Load()
if (loaded == null)
{
Debug.LogWarning("세이브 파일이 잘못되었습니다.");
return;
return false;
}
_state = loaded;
Changed?.Invoke();
return;
return true;
}
catch (Exception e)
{
Debug.LogWarning($"[StoryManager] 저장 파일 로드 실패: {e.Message}");
return;
return false;
}
}