From a418b8425d6d2d6e15712f1747ff7b03ed047217 Mon Sep 17 00:00:00 2001 From: Bomjdeveloper <100873915+Bomjdeveloper@users.noreply.github.com> Date: Fri, 14 Jun 2024 22:33:34 +0300 Subject: [PATCH] Update ClickerRunner.cs Shows bug here, because there is no save to load --- Samples~/Example/Scripts/ClickerRunner.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Samples~/Example/Scripts/ClickerRunner.cs b/Samples~/Example/Scripts/ClickerRunner.cs index 694d58c..86f7c21 100644 --- a/Samples~/Example/Scripts/ClickerRunner.cs +++ b/Samples~/Example/Scripts/ClickerRunner.cs @@ -1,6 +1,7 @@ using System.Collections; using uClicker; using UnityEngine; +using System; public class ClickerRunner : MonoBehaviour { @@ -9,7 +10,15 @@ public class ClickerRunner : MonoBehaviour // Use this for initialization IEnumerator Start() { - Manager.LoadProgress(); + + try + { + Manager.LoadProgress(); + } + catch (Exception e) + { + Debug.Log("No save!"); + } while (Application.isPlaying) { yield return new WaitForSecondsRealtime(1); @@ -23,4 +32,4 @@ private void OnDestroy() { Manager.SaveProgress(); } -} \ No newline at end of file +}