diff --git a/Assets/RothenburgAR/Scripts/Common/TextElement.cs b/Assets/RothenburgAR/Scripts/Common/TextElement.cs index 08b3585..a4662c2 100644 --- a/Assets/RothenburgAR/Scripts/Common/TextElement.cs +++ b/Assets/RothenburgAR/Scripts/Common/TextElement.cs @@ -1,8 +1,8 @@ -using UnityEngine; -using System; +using System; using System.Collections.Generic; using System.IO; using System.Xml; +using UnityEngine; namespace RothenburgAR.Common { @@ -77,7 +77,18 @@ namespace RothenburgAR.Common TextEntryType type = TextElement.GetTextEntryTypeFromString(typeStr); var valueStr = xmlNode.Attributes["value"].Value; if (type == TextEntryType.File) - valueStr = valueStr; + { + var file = Resources.Load(valueStr); + if (file != null) + { + valueStr = file.text; + type = TextEntryType.Inline; + } + else + { + valueStr = Path.Combine(basePath, valueStr); + } + } textElement.AddTextElement(langCode, type, valueStr); } return textElement; @@ -104,15 +115,13 @@ namespace RothenburgAR.Common if (Type == TextEntryType.Inline) return Value; - // Attention: - // if there should be performance issues, here could be a nice place to add caching - var file = Resources.Load(Value); - // If it is no inline text, we need to have a file path as "value". - if (file == null) + if (!File.Exists(Value)) throw new FileNotFoundException(); - return file.text; + // Attention: + // if there should be performance issues, here could be a nice place to add caching + return File.ReadAllText(Value, System.Text.Encoding.UTF8); } } diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 983f3b5..f24cb0c 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -39,6 +39,7 @@ GraphicsSettings: - {fileID: 4800000, guid: 3a1c68c8292caf046bd21158886c5e40, type: 3} - {fileID: 207, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 1b05f94..a4a8e5e 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -168,9 +168,9 @@ PlayerSettings: AndroidPreferredInstallLocation: 1 aotOptions: stripEngineCode: 1 - iPhoneStrippingLevel: 0 + iPhoneStrippingLevel: 1 iPhoneScriptCallOptimization: 0 - ForceInternetPermission: 0 + ForceInternetPermission: 1 ForceSDCardPermission: 1 CreateWallpaper: 0 APKExpansionFiles: 0 @@ -248,7 +248,7 @@ PlayerSettings: AndroidKeystoreName: AndroidKeyaliasName: AndroidTVCompatibility: 0 - AndroidIsGame: 1 + AndroidIsGame: 0 AndroidEnableTango: 0 androidEnableBanner: 1 androidUseLowAccuracyLocation: 0 @@ -271,6 +271,9 @@ PlayerSettings: - m_BuildTarget: AndroidPlayer m_APIs: 08000000 m_Automatic: 0 + - m_BuildTarget: iOSSupport + m_APIs: 08000000 + m_Automatic: 0 m_BuildTargetVRSettings: [] m_BuildTargetEnableVuforiaSettings: - m_BuildTarget: Android diff --git a/RothenburgAR.apk b/RothenburgAR.apk index ef834eb..eecacdc 100644 Binary files a/RothenburgAR.apk and b/RothenburgAR.apk differ