diff --git a/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs b/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs index d6a3af6..5bc76b4 100644 --- a/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs +++ b/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs @@ -208,8 +208,6 @@ namespace RothenburgAR.Updater private void UpdateMedia(Exhibit exhibit) { - //TODO check existing file for creation/alteration date to see if download is necessary - var mediaIDs = exhibit.Pois.Select(p => p.MediaId).Except(new List { null }).ToList(); foreach (var mediaId in mediaIDs) @@ -217,7 +215,7 @@ namespace RothenburgAR.Updater var path = PathHelper.CombinePaths(PathHelper.MediaPath, mediaId); var filepath = Path.Combine(path, "media.zip"); - //TODO cancel download if unnecessary + //TODO cancel download if unnecessary, how to check if unnecessary? if (File.Exists(filepath)) continue; // create file and dir if nonexistent @@ -286,7 +284,12 @@ namespace RothenburgAR.Updater downloadProgress /= httpHandlers.Count; - ProgressBar.value = downloadProgress; + // operation.progress is bugged and goes all over the place: + // jumps from 0 to 1 and back despite not being done + // steadily increases from 0,5 to 0,99 and resets to 0,5 multiple times (5-15x) during a single download + + // update progress bar and ignore all negative changes + ProgressBar.value = ProgressBar.value < downloadProgress ? downloadProgress : ProgressBar.value; } // Continue to Main Scene after all downloads are done and this.afterDownloadWaitTime seconds have passed without any new downloads triggering. diff --git a/Assets/updaterScene.unity b/Assets/updaterScene.unity index c77573c..338a013 100644 --- a/Assets/updaterScene.unity +++ b/Assets/updaterScene.unity @@ -351,7 +351,7 @@ MonoBehaviour: m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: - m_NormalColor: {r: 0.011764707, g: 0.6627451, b: 0.9568628, a: 1} + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} @@ -395,7 +395,7 @@ MonoBehaviour: m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} + m_Material: {fileID: 2100000, guid: bb09bb844e7d9f84da8e12b7ef465ac5, type: 2} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: @@ -1129,8 +1129,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4279308561 - m_fontColor: {r: 0.06666667, g: 0.06666667, b: 0.06666667, a: 1} + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} m_enableVertexGradient: 0 m_fontColorGradient: topLeft: {r: 1, g: 1, b: 1, a: 1} @@ -1424,11 +1424,11 @@ MonoBehaviour: lineCount: 3 pageCount: 1 materialCount: 1 - m_havePropertiesChanged: 1 + m_havePropertiesChanged: 0 m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 m_spriteAnimator: {fileID: 0} - m_isInputParsingRequired: 1 + m_isInputParsingRequired: 0 m_inputSource: 0 m_hasFontAssetChanged: 0 m_subTextObjects: @@ -1589,7 +1589,7 @@ MonoBehaviour: m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: - m_NormalColor: {r: 0.011764707, g: 0.6627451, b: 0.9568628, a: 1} + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} @@ -1633,7 +1633,7 @@ MonoBehaviour: m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} + m_Material: {fileID: 2100000, guid: bb09bb844e7d9f84da8e12b7ef465ac5, type: 2} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: @@ -1702,8 +1702,8 @@ MonoBehaviour: m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.011764706, g: 0.6627451, b: 0.95686275, a: 1} + m_Material: {fileID: 2100000, guid: bb09bb844e7d9f84da8e12b7ef465ac5, type: 2} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -1788,8 +1788,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4279308561 - m_fontColor: {r: 0.06666667, g: 0.06666667, b: 0.06666667, a: 1} + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} m_enableVertexGradient: 0 m_fontColorGradient: topLeft: {r: 1, g: 1, b: 1, a: 1} @@ -2338,8 +2338,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4279308561 - m_fontColor: {r: 0.06666667, g: 0.06666667, b: 0.06666667, a: 1} + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} m_enableVertexGradient: 0 m_fontColorGradient: topLeft: {r: 1, g: 1, b: 1, a: 1} @@ -2404,11 +2404,11 @@ MonoBehaviour: lineCount: 1 pageCount: 1 materialCount: 1 - m_havePropertiesChanged: 1 + m_havePropertiesChanged: 0 m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 m_spriteAnimator: {fileID: 0} - m_isInputParsingRequired: 1 + m_isInputParsingRequired: 0 m_inputSource: 0 m_hasFontAssetChanged: 0 m_subTextObjects: