diff --git a/Assets/Script/Game/GameManager.cs b/Assets/Script/Game/GameManager.cs index 982dd2d..c3fff17 100644 --- a/Assets/Script/Game/GameManager.cs +++ b/Assets/Script/Game/GameManager.cs @@ -62,7 +62,6 @@ public class GameManager : Singleton UpdateMainPanelUI(OpenMainPanel); // ScoreData.SetScore(userInfo.score); OpenConfirmPanel(userInfo.nickname + "님 로그인 성공하였습니다.", () => { }); - Debug.Log(userInfo.nickname); }, () => { Debug.Log("자동 로그인 실패"); diff --git a/Assets/Script/Replay/ReplayCell.cs b/Assets/Script/Replay/ReplayCell.cs index a69f08c..2701543 100644 --- a/Assets/Script/Replay/ReplayCell.cs +++ b/Assets/Script/Replay/ReplayCell.cs @@ -1,5 +1,6 @@ using System.Collections; using System.Collections.Generic; +using System.Text; using TMPro; using UnityEngine; using UnityEngine.UI; @@ -45,16 +46,32 @@ public class ReplayCell : MonoBehaviour public void SetRecordDate(string date) { - string text = ""; + if (string.IsNullOrEmpty(date)) + { + // 입력이 비어있거나 null인 경우 예외 처리 + recordDateText.text = "Invalid Date Format"; + return; + } + string[] dateSplit = date.Split(' '); if (dateSplit.Length == 2) { - text += dateSplit[0].Replace("-", "."); - text += "\n"; - text += dateSplit[1].Replace("_", ":"); - } + StringBuilder text = new StringBuilder(); + + // 첫 번째 부분 (날짜) - "-"을 "."으로 교체 + text.Append(dateSplit[0].Replace("-", ".")); + text.Append("\n"); + + // 두 번째 부분 (시간) - "_"을 ":"으로 교체 + text.Append(dateSplit[1].Replace("_", ":")); - recordDateText.text = text; + recordDateText.text = text.ToString(); + } + else + { + // 잘못된 포맷 처리 + recordDateText.text = "Invalid Date Format"; + } } public void SetReplayRecord(ReplayRecord record)