moved language select view assets to localization folder in Resources as well

This commit is contained in:
2018-12-22 16:20:25 +01:00
parent 9b12bf239a
commit 73a0ad4942
18 changed files with 335 additions and 27 deletions

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 2bd6ad883b515814d9c8b932f563372d
folderAsset: yes
timeCreated: 1545490981
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<localization>
<language key="de" name="Deutsch" flagPath="localization/flag_de.png"/>
<language key="en" name="English" flagPath="localization/flag_uk_us.png" default="true"/>
<language key="de" name="Deutsch" flagPath="localization/flag_de"/>
<language key="en" name="English" flagPath="localization/flag_uk_us" default="true"/>
<entry name="t_color_name_light_blue">
<text lang="de" type="inline" value="Hellblau"/>
<text lang="en" type="inline" value="Light Blue"/>
@@ -55,11 +55,11 @@
<text lang="en" type="inline" value="Large"/>
</entry>
<entry name="t_credits">
<text lang="de" type="file" value="localization/t_credits_de.txt"/>
<text lang="en" type="file" value="localization/t_credits_en.txt"/>
<text lang="de" type="file" value="localization/t_credits_de"/>
<text lang="en" type="file" value="localization/t_credits_en"/>
</entry>
<entry name="t_credits_version">
<text lang="de" type="file" value="localization/t_credits_version.txt"/>
<text lang="en" type="file" value="localization/t_credits_version.txt"/>
<text lang="de" type="file" value="localization/t_credits_version"/>
<text lang="en" type="file" value="localization/t_credits_version"/>
</entry>
</localization>

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

View File

@@ -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:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -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:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -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:

View File

@@ -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.

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5e33d40fce62ea349af0e5cb81a4058b
timeCreated: 1545490982
licenseType: Free
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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.

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 7e87879c9f3136b4a8527b183fd599c8
timeCreated: 1545490982
licenseType: Free
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1 @@
Version RC3 - 05.10.2017

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: fe180226794a33a4fb817bbc80b657c6
timeCreated: 1545490982
licenseType: Free
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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<TextAsset>(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;
}
}

View File

@@ -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);

View File

@@ -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<Texture2D>(language.FlagImagePath);
if (texture != null)
{
var image = newFlag.GetComponentInChildren<Image>();
image.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
image.preserveAspect = true;

View File

@@ -212,7 +212,7 @@ namespace RothenburgAR.Updater
var exhibits = JsonConvert.DeserializeObject<List<ApiExhibit>>(http.Download.text);
foreach (var exhibit in exhibits)
{
UpdateMedia(exhibit);
UpdateMedia(exhibit, currentHandlers);
}
};
}
@@ -225,13 +225,13 @@ namespace RothenburgAR.Updater
private IEnumerator UpdateVersionFileCoroutine(List<HttpHandler> 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<HttpHandler> batchHandlers)
{
var mediaIDs = exhibit.Pois.Select(p => p.MediaId).Except(new List<string> { 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<HttpHandler>());
}
}
@@ -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<HttpHandler> 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 =>
{