diff --git a/Assets/Resources/localization.meta b/Assets/Resources/localization.meta
new file mode 100644
index 0000000..89a3a58
--- /dev/null
+++ b/Assets/Resources/localization.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 2bd6ad883b515814d9c8b932f563372d
+folderAsset: yes
+timeCreated: 1545490981
+licenseType: Free
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/localization.xml b/Assets/Resources/localization.xml
index 93ee8cd..7b7f87b 100644
--- a/Assets/Resources/localization.xml
+++ b/Assets/Resources/localization.xml
@@ -1,7 +1,7 @@
-
-
+
+
@@ -55,11 +55,11 @@
-
-
+
+
-
-
+
+
\ No newline at end of file
diff --git a/Assets/Resources/localization/flag_de.png b/Assets/Resources/localization/flag_de.png
new file mode 100644
index 0000000..bfa00bb
Binary files /dev/null and b/Assets/Resources/localization/flag_de.png differ
diff --git a/Assets/Resources/localization/flag_de.png.meta b/Assets/Resources/localization/flag_de.png.meta
new file mode 100644
index 0000000..1b67543
--- /dev/null
+++ b/Assets/Resources/localization/flag_de.png.meta
@@ -0,0 +1,78 @@
+fileFormatVersion: 2
+guid: 25491ea9c6e1b7244b2d9cacdd154d8f
+timeCreated: 1545490981
+licenseType: Free
+TextureImporter:
+ fileIDToRecycleName: {}
+ externalObjects: {}
+ serializedVersion: 4
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapU: -1
+ wrapV: -1
+ wrapW: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ spritePackingTag:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/localization/flag_jp.png b/Assets/Resources/localization/flag_jp.png
new file mode 100644
index 0000000..e24c46c
Binary files /dev/null and b/Assets/Resources/localization/flag_jp.png differ
diff --git a/Assets/Resources/localization/flag_jp.png.meta b/Assets/Resources/localization/flag_jp.png.meta
new file mode 100644
index 0000000..a539426
--- /dev/null
+++ b/Assets/Resources/localization/flag_jp.png.meta
@@ -0,0 +1,78 @@
+fileFormatVersion: 2
+guid: 2c05577f49b120f4b8ee7b9733af5ad2
+timeCreated: 1545490982
+licenseType: Free
+TextureImporter:
+ fileIDToRecycleName: {}
+ externalObjects: {}
+ serializedVersion: 4
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapU: -1
+ wrapV: -1
+ wrapW: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ spritePackingTag:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/localization/flag_uk_us.png b/Assets/Resources/localization/flag_uk_us.png
new file mode 100644
index 0000000..b30a8d9
Binary files /dev/null and b/Assets/Resources/localization/flag_uk_us.png differ
diff --git a/Assets/Resources/localization/flag_uk_us.png.meta b/Assets/Resources/localization/flag_uk_us.png.meta
new file mode 100644
index 0000000..48a81d3
--- /dev/null
+++ b/Assets/Resources/localization/flag_uk_us.png.meta
@@ -0,0 +1,78 @@
+fileFormatVersion: 2
+guid: c64690fd7ce0e5c4a8061babcfa165a6
+timeCreated: 1545490982
+licenseType: Free
+TextureImporter:
+ fileIDToRecycleName: {}
+ externalObjects: {}
+ serializedVersion: 4
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapU: -1
+ wrapV: -1
+ wrapW: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ spritePackingTag:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/localization/t_credits_de.txt b/Assets/Resources/localization/t_credits_de.txt
new file mode 100644
index 0000000..066f2fd
--- /dev/null
+++ b/Assets/Resources/localization/t_credits_de.txt
@@ -0,0 +1,17 @@
+Diese Anwendung wurde als Projektarbeit im 6. Semester von Studenten der Hochschule für angewandte Wissenschaften Würzburg-Schweinfurt erstellt.
+
+Entwicklerteam:
+René Ziegler
+Matthias Kleinhenz
+Alexander Frühwald
+
+Betreuer FHWS:
+Prof. Dr. Frank Deinzer
+Toni Fetzer
+
+Besonderer Dank für die Aufnahme der 3D-Scans geht an Frank Ebner.
+
+Verantwortlicher im Auftrag des Reichstadtmuseums in Rothenburg:
+Dr. Hellmuth Möhring
+
+Die in dieser App verwendeten Icons sind Teil der Google Material Icon Library, abrufbar unter https://material.io/icons/ und sind lizenziert unter der Apache License Version 2.0.
\ No newline at end of file
diff --git a/Assets/Resources/localization/t_credits_de.txt.meta b/Assets/Resources/localization/t_credits_de.txt.meta
new file mode 100644
index 0000000..650cf06
--- /dev/null
+++ b/Assets/Resources/localization/t_credits_de.txt.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 5e33d40fce62ea349af0e5cb81a4058b
+timeCreated: 1545490982
+licenseType: Free
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/localization/t_credits_en.txt b/Assets/Resources/localization/t_credits_en.txt
new file mode 100644
index 0000000..f7eda7f
--- /dev/null
+++ b/Assets/Resources/localization/t_credits_en.txt
@@ -0,0 +1,17 @@
+This app has been created as a project by 6th semester students at the University of Applied Sciences Wurzburg-Schweinfurt.
+
+Developer Team:
+René Ziegler
+Matthias Kleinhenz
+Alexander Frühwald
+
+Project Monitoring FHWS:
+Prof. Dr. Frank Deinzer
+Toni Fetzer
+
+Special thanks for taking the 3D-Scans go to Frank Ebner.
+
+Responsible on behalf of the Reichstadtmuseum of Rothenburg:
+Dr. Hellmuth Moehring
+
+Icons used in this App are part of the Google Material Icon Library, available at https://material.io/icons/ and are licensed under the Apache License Version 2.0.
\ No newline at end of file
diff --git a/Assets/Resources/localization/t_credits_en.txt.meta b/Assets/Resources/localization/t_credits_en.txt.meta
new file mode 100644
index 0000000..0d4735e
--- /dev/null
+++ b/Assets/Resources/localization/t_credits_en.txt.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 7e87879c9f3136b4a8527b183fd599c8
+timeCreated: 1545490982
+licenseType: Free
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/localization/t_credits_version.txt b/Assets/Resources/localization/t_credits_version.txt
new file mode 100644
index 0000000..0dd00d0
--- /dev/null
+++ b/Assets/Resources/localization/t_credits_version.txt
@@ -0,0 +1 @@
+Version RC3 - 05.10.2017
\ No newline at end of file
diff --git a/Assets/Resources/localization/t_credits_version.txt.meta b/Assets/Resources/localization/t_credits_version.txt.meta
new file mode 100644
index 0000000..2ac14f9
--- /dev/null
+++ b/Assets/Resources/localization/t_credits_version.txt.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: fe180226794a33a4fb817bbc80b657c6
+timeCreated: 1545490982
+licenseType: Free
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/RothenburgAR/Scripts/Common/TextElement.cs b/Assets/RothenburgAR/Scripts/Common/TextElement.cs
index e9c216d..08b3585 100644
--- a/Assets/RothenburgAR/Scripts/Common/TextElement.cs
+++ b/Assets/RothenburgAR/Scripts/Common/TextElement.cs
@@ -1,4 +1,5 @@
-using System;
+using UnityEngine;
+using System;
using System.Collections.Generic;
using System.IO;
using System.Xml;
@@ -76,7 +77,7 @@ namespace RothenburgAR.Common
TextEntryType type = TextElement.GetTextEntryTypeFromString(typeStr);
var valueStr = xmlNode.Attributes["value"].Value;
if (type == TextEntryType.File)
- valueStr = Path.Combine(basePath, valueStr);
+ valueStr = valueStr;
textElement.AddTextElement(langCode, type, valueStr);
}
return textElement;
@@ -103,13 +104,15 @@ namespace RothenburgAR.Common
if (Type == TextEntryType.Inline)
return Value;
- // If it is no inline text, we need to have a file path as "value".
- if (!File.Exists(Value))
- throw new FileNotFoundException();
-
// Attention:
// if there should be performance issues, here could be a nice place to add caching
- return File.ReadAllText(Value, System.Text.Encoding.UTF8);
+ var file = Resources.Load(Value);
+
+ // If it is no inline text, we need to have a file path as "value".
+ if (file == null)
+ throw new FileNotFoundException();
+
+ return file.text;
}
}
diff --git a/Assets/RothenburgAR/Scripts/LanguageManager.cs b/Assets/RothenburgAR/Scripts/LanguageManager.cs
index 3ef2345..05b1c3b 100644
--- a/Assets/RothenburgAR/Scripts/LanguageManager.cs
+++ b/Assets/RothenburgAR/Scripts/LanguageManager.cs
@@ -100,7 +100,7 @@ namespace RothenburgAR
{
var langKey = languageNode.Attributes["key"].Value;
var langName = languageNode.Attributes["name"].Value;
- var langFlagPath = Path.Combine(PathHelper.DataPath, languageNode.Attributes["flagPath"].Value);
+ var langFlagPath = languageNode.Attributes["flagPath"].Value;
AddLanguage(langKey, langName, langFlagPath);
diff --git a/Assets/RothenburgAR/Scripts/UI/LanguageSelectViewBehaviour.cs b/Assets/RothenburgAR/Scripts/UI/LanguageSelectViewBehaviour.cs
index 0b7d3eb..60706c8 100644
--- a/Assets/RothenburgAR/Scripts/UI/LanguageSelectViewBehaviour.cs
+++ b/Assets/RothenburgAR/Scripts/UI/LanguageSelectViewBehaviour.cs
@@ -32,13 +32,10 @@ namespace RothenburgAR.UI
{
var newFlag = GameObject.Instantiate(FlagPrefab, FlagContainer.transform);
newFlag.SetActive(true);
-
- if (File.Exists(language.FlagImagePath))
- {
- var bytes = File.ReadAllBytes(language.FlagImagePath);
- Texture2D texture = new Texture2D(4, 4, TextureFormat.RGBA32, false);
- texture.LoadImage(bytes);
+ var texture = Resources.Load(language.FlagImagePath);
+ if (texture != null)
+ {
var image = newFlag.GetComponentInChildren();
image.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
image.preserveAspect = true;
diff --git a/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs b/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs
index 253fe03..95746b7 100644
--- a/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs
+++ b/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs
@@ -212,7 +212,7 @@ namespace RothenburgAR.Updater
var exhibits = JsonConvert.DeserializeObject>(http.Download.text);
foreach (var exhibit in exhibits)
{
- UpdateMedia(exhibit);
+ UpdateMedia(exhibit, currentHandlers);
}
};
}
@@ -225,13 +225,13 @@ namespace RothenburgAR.Updater
private IEnumerator UpdateVersionFileCoroutine(List currentHandlers, string versionPath, string version)
{
// updates version file only if all sub files were downloaded successfully
- yield return new WaitUntil(() => httpHandlers.All(h => h.IsDone));
- if (httpHandlers.Any(http => http.Request.isNetworkError || http.Request.isHttpError)) yield break;
+ yield return new WaitUntil(() => currentHandlers.All(h => h.IsDone));
+ if (currentHandlers.Any(http => http.Request.isNetworkError || http.Request.isHttpError)) yield break;
File.WriteAllText(versionPath, version);
}
- private void UpdateMedia(ApiExhibit exhibit)
+ private void UpdateMedia(ApiExhibit exhibit, List batchHandlers)
{
var mediaIDs = exhibit.Pois.Select(p => p.MediaId).Except(new List { null }).ToList();
@@ -255,6 +255,7 @@ namespace RothenburgAR.Updater
.Send();
httpHandlers.Add(http);
+ batchHandlers.Add(http);
http.Operation.completed += ar =>
{
@@ -276,7 +277,7 @@ namespace RothenburgAR.Updater
var subfiles = subfilesHeader.Split(separator, StringSplitOptions.RemoveEmptyEntries);
foreach (var subfile in subfiles)
{
- UpdateSubfile(path, url, subfile);
+ UpdateSubfile(path, url, subfile, batchHandlers);
}
}
@@ -326,7 +327,7 @@ namespace RothenburgAR.Updater
var subfiles = subfilesHeader.Split(separator, StringSplitOptions.RemoveEmptyEntries);
foreach (var subfile in subfiles)
{
- UpdateSubfile(path, url, subfile);
+ UpdateSubfile(path, url, subfile, new List());
}
}
@@ -351,7 +352,7 @@ namespace RothenburgAR.Updater
return eTag;
}
- private void UpdateSubfile(string path, string parentUrl, string subfile)
+ private void UpdateSubfile(string path, string parentUrl, string subfile, List batchHandlers)
{
var filepath = Path.Combine(path, subfile);
var eTag = GenerateETag(filepath);
@@ -362,6 +363,7 @@ namespace RothenburgAR.Updater
.Send();
httpHandlers.Add(http);
+ batchHandlers.Add(http);
http.Operation.completed += ar =>
{