Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Samples~/Example/Scripts/ClickerRunner.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections;
using uClicker;
using UnityEngine;
using System;

public class ClickerRunner : MonoBehaviour
{
Expand All @@ -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);
Expand All @@ -23,4 +32,4 @@ private void OnDestroy()
{
Manager.SaveProgress();
}
}
}