diff --git a/Assets/RothenburgAR/Scripts/AppInitializerBehaviour.cs b/Assets/RothenburgAR/Scripts/AppInitializerBehaviour.cs index 070fdde..51e3d1f 100644 --- a/Assets/RothenburgAR/Scripts/AppInitializerBehaviour.cs +++ b/Assets/RothenburgAR/Scripts/AppInitializerBehaviour.cs @@ -12,6 +12,7 @@ namespace RothenburgAR { public Camera UICamera; public Camera UIObjectCamera; + private LogFileHandler logFileHandler; // Use this for initialization void Start() diff --git a/Assets/RothenburgAR/Scripts/UI/UpdaterViewBehaviour.cs b/Assets/RothenburgAR/Scripts/UI/UpdaterViewBehaviour.cs index ed89ba9..2dc6ffe 100644 --- a/Assets/RothenburgAR/Scripts/UI/UpdaterViewBehaviour.cs +++ b/Assets/RothenburgAR/Scripts/UI/UpdaterViewBehaviour.cs @@ -15,6 +15,8 @@ namespace RothenburgAR.UI private void Start() { + UIManager.Instance.StartingUp = false; + UpdateDialog.SetActive(true); UpdateConfirmationDialog.SetActive(false); UpdateCompletedDialog.SetActive(false); diff --git a/Assets/RothenburgAR/Scripts/Updater/UpdateManager.cs b/Assets/RothenburgAR/Scripts/Updater/UpdateManager.cs index d67dda0..5d6c8b9 100644 --- a/Assets/RothenburgAR/Scripts/Updater/UpdateManager.cs +++ b/Assets/RothenburgAR/Scripts/Updater/UpdateManager.cs @@ -28,14 +28,12 @@ namespace RothenburgAR.Updater public int CurrentProgress { get; private set; } public int MaxProgress { get; private set; } - private float afterDownloadWaitTime = 10f; private readonly int retriesUntilFailure = 4; private readonly string trackerMainFile = "tracker.dat"; public ApiVersioncheckAnswer VersionAnswer { get; set; } Dictionary> ExhibitMetas = new Dictionary>(); - private LogFileHandler logFileHandler; void Start() { @@ -82,7 +80,6 @@ namespace RothenburgAR.Updater if (VersionAnswer.Data.TrueForAll(d => d.Meta.Status == VersionStatus.ok && d.Tracker.Status == VersionStatus.ok)) { - afterDownloadWaitTime = 0f; StartCoroutine(CheckFiles()); return; } @@ -96,6 +93,9 @@ namespace RothenburgAR.Updater else { UpdateState = UpdateState.ConfirmationPending; + + if (!UIManager.Instance.StartingUp) + UIManager.Instance.SwitchToView(ViewName.UpdaterView); } }; } @@ -444,13 +444,15 @@ namespace RothenburgAR.Updater http.Request.responseCode)); UpdateState = UpdateState.Failed; + + if (!UIManager.Instance.StartingUp) + UIManager.Instance.SwitchToView(ViewName.UpdaterView); } public void UpdatesCompleted() { UpdateState = UpdateState.Completed; - //TODO force switch to UpdaterView when update needs to be applied if (!UIManager.Instance.StartingUp) UIManager.Instance.SwitchToView(ViewName.UpdaterView); }