feat: 현재 화면내에 HeartSystem이 없는 경우 예외처리
This commit is contained in:
1 parent
8bba51ee05
commit
5e72557955
1 file changed
+7
-1
@@ -134,7 +134,13 @@ namespace TON
|
||||
currentHeartData.lastHeartTime = DateTime.Now.ToString();
|
||||
}
|
||||
SaveHeartData();
|
||||
FindObjectOfType<HeartSystem>().UpdateHeartUI(); // UI 업데이트
|
||||
|
||||
HeartSystem heartSystem = FindObjectOfType<HeartSystem>();
|
||||
if (heartSystem != null)
|
||||
{
|
||||
heartSystem.UpdateHeartUI(); // UI 업데이트
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user