moved logFileHandler from appInitializer to updater to make debugging on android easier
fixed bug on android when generating the version map
This commit is contained in:
@@ -11,18 +11,9 @@ namespace RothenburgAR
|
||||
{
|
||||
public Camera UICamera;
|
||||
|
||||
private LogFileHandler logFileHandler = null;
|
||||
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
{
|
||||
#if !UNITY_EDITOR
|
||||
logFileHandler = new LogFileHandler();
|
||||
#else
|
||||
Debug.Log("Found Unity Editor; Disabled logging into file.");
|
||||
#endif
|
||||
|
||||
LanguageManager.Instance.LoadLanguagesFromXml();
|
||||
UIColorSchemeManager.Instance.Initialize();
|
||||
|
||||
|
||||
@@ -12,12 +12,14 @@ namespace RothenburgAR.Updater
|
||||
public class UpdaterBehaviour : MonoBehaviour
|
||||
{
|
||||
public UnityEngine.UI.Slider ProgressBar;
|
||||
public GameObject UpdateDialog;
|
||||
public GameObject UpdateConfirmationDialog;
|
||||
|
||||
private float afterDownloadWaitTime = 300f;
|
||||
|
||||
private float afterDownloadWaitTime = 10f;
|
||||
|
||||
public VersioncheckAnswer VersionAnswer { get; set; }
|
||||
private List<HttpHandler> httpHandlers = new List<HttpHandler>();
|
||||
private LogFileHandler logFileHandler;
|
||||
|
||||
void Start()
|
||||
{
|
||||
@@ -26,7 +28,15 @@ namespace RothenburgAR.Updater
|
||||
oder beim update auswählen lassen, welche kommen sollen
|
||||
*/
|
||||
|
||||
#if !UNITY_EDITOR
|
||||
logFileHandler = new LogFileHandler();
|
||||
#else
|
||||
Debug.Log("Found Unity Editor; Disabled logging into file.");
|
||||
#endif
|
||||
|
||||
FindObjectsOfType<Camera>().First().enabled = true;
|
||||
UpdateDialog.SetActive(false);
|
||||
UpdateConfirmationDialog.SetActive(false);
|
||||
|
||||
if (Application.internetReachability == NetworkReachability.NotReachable)
|
||||
{
|
||||
@@ -65,6 +75,8 @@ namespace RothenburgAR.Updater
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateDialog.SetActive(true);
|
||||
|
||||
if (Application.internetReachability == NetworkReachability.ReachableViaLocalAreaNetwork)
|
||||
{
|
||||
TriggerUpdate();
|
||||
@@ -78,9 +90,14 @@ namespace RothenburgAR.Updater
|
||||
|
||||
private string GenerateVersionMap()
|
||||
{
|
||||
string result = "{";
|
||||
string result = "{ ";
|
||||
|
||||
var rootDir = new DirectoryInfo(PathHelper.ExhibitionPath);
|
||||
if (!rootDir.Exists)
|
||||
{
|
||||
rootDir.Create();
|
||||
}
|
||||
|
||||
var exhibitionDirs = rootDir.GetDirectories().ToList();
|
||||
exhibitionDirs.ForEach(dir =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user