diff --git a/Assets/MirageXR/Common/Scripts/CalibrationTool.cs b/Assets/MirageXR/Common/Scripts/CalibrationTool.cs index 61b50e194..7c831d087 100644 --- a/Assets/MirageXR/Common/Scripts/CalibrationTool.cs +++ b/Assets/MirageXR/Common/Scripts/CalibrationTool.cs @@ -30,7 +30,7 @@ public void Initialization(float animationTime) if (imageTarget == null) { - AppLog.LogError("Can't find IImageTarget"); + Debug.LogError("Can't find IImageTarget"); return; } diff --git a/Assets/MirageXR/Common/Scripts/CombinedEditor/ActionDetailView/Annotation Editors/ImageMarker Prefabs/ImageMarkerController.cs b/Assets/MirageXR/Common/Scripts/CombinedEditor/ActionDetailView/Annotation Editors/ImageMarker Prefabs/ImageMarkerController.cs index 62c0e3f1a..52f98a8a9 100644 --- a/Assets/MirageXR/Common/Scripts/CombinedEditor/ActionDetailView/Annotation Editors/ImageMarker Prefabs/ImageMarkerController.cs +++ b/Assets/MirageXR/Common/Scripts/CombinedEditor/ActionDetailView/Annotation Editors/ImageMarker Prefabs/ImageMarkerController.cs @@ -26,13 +26,13 @@ private async Task InitAsync() { if (string.IsNullOrEmpty(_content.url)) { - AppLog.LogError("Content URL not provided."); + Debug.LogError("Content URL not provided."); return false; } if (!SetParent(_content)) { - AppLog.LogError("Couldn't set the parent."); + Debug.LogError("Couldn't set the parent."); return false; } @@ -53,7 +53,7 @@ private async Task InitAsync() if (imageTarget == null) { - AppLog.LogError("Can't add image target"); + Debug.LogError("Can't add image target"); return false; } } @@ -71,7 +71,7 @@ private async Task LoadImage() if (!texture.LoadImage(byteArray)) { - AppLog.LogError($"Can't load image. path: {imagePath}"); + Debug.LogError($"Can't load image. path: {imagePath}"); return null; } @@ -102,7 +102,7 @@ private void MoveDetectableToImage(Transform targetHolder) } else { - AppLog.LogError($"Can't find detectable {detectable.id}"); + Debug.LogError($"Can't find detectable {detectable.id}"); } } @@ -118,7 +118,7 @@ public void MoveDetectableBack() } else { - AppLog.LogError($"Can't find detectable {detectable.id}"); + Debug.LogError($"Can't find detectable {detectable.id}"); } } @@ -139,7 +139,7 @@ private void OnDestroy() } catch (Exception e) { - AppLog.LogError("Error when destroying image marker controller" + e.ToString()); + Debug.LogError("Error when destroying image marker controller" + e.ToString()); } } } diff --git a/Assets/MirageXR/Common/Scripts/DataModel/WorkplaceViewUpdater.cs b/Assets/MirageXR/Common/Scripts/DataModel/WorkplaceViewUpdater.cs index 37e0e444b..45a938fc9 100644 --- a/Assets/MirageXR/Common/Scripts/DataModel/WorkplaceViewUpdater.cs +++ b/Assets/MirageXR/Common/Scripts/DataModel/WorkplaceViewUpdater.cs @@ -34,10 +34,10 @@ public static async Task CreateObjects() // If workplace has anchors which have not been calibrated... if (workplaceManager.calibrationPairs.Count > 0 && !UiManager.Instance.IsCalibrated) { - AppLog.LogWarning("Workplace has uncalibrated anchors. Please re-run the calibration"); + Debug.LogWarning("Workplace has uncalibrated anchors. Please re-run the calibration"); } - AppLog.LogInfo("********** EventManager.WorkplaceLoaded"); + Debug.Log("********** EventManager.WorkplaceLoaded"); // SUGGESTION Use a different event here that symbolizes the end of the view update by the model EventManager.WorkplaceLoaded(); } diff --git a/Assets/MirageXR/Common/Scripts/Logger.meta b/Assets/MirageXR/Common/Scripts/Logger.meta new file mode 100644 index 000000000..d4eafad69 --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Logger.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 86bbde9d30f8a4b44b05a2fba58f80c4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Common/Scripts/Logger/Debug.cs b/Assets/MirageXR/Common/Scripts/Logger/Debug.cs new file mode 100644 index 000000000..e68fdf244 --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Logger/Debug.cs @@ -0,0 +1,66 @@ +using i5.Toolkit.Core.VerboseLogging; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Debug : UnityEngine.Debug +{ + public static LogLevel MinimumLogLevel + { + get => AppLog.MinimumLogLevel; + set + { + AppLog.MinimumLogLevel = value; + } + } + + public static void LogCritical(object message, Object context) + { + AppLog.LogCritical(message.ToString(), context); + } + + public static new void LogError(object message) + { + AppLog.LogError(message.ToString()); + } + + public static new void LogError(object message, Object context) + { + AppLog.LogError(message.ToString(), context); + } + + public static new void LogWarning(object message) + { + AppLog.LogWarning(message.ToString()); + } + + public static new void LogWarning(object message, Object context) + { + AppLog.LogWarning(message.ToString(), context); + } + + public static new void Log(object message) + { + AppLog.LogInfo(message.ToString()); + } + + public static new void Log(object message, Object context) + { + AppLog.LogInfo(message.ToString(), context); + } + + public static void LogInfo(object message, Object context = null) + { + AppLog.LogInfo(message.ToString(), context); + } + + public static void LogDebug(object message, Object context = null) + { + AppLog.LogDebug(message.ToString(), context); + } + + public static void LogTrace(object message, Object context = null) + { + AppLog.LogTrace(message.ToString(), context); + } +} diff --git a/Assets/MirageXR/Common/Scripts/Logger/Debug.cs.meta b/Assets/MirageXR/Common/Scripts/Logger/Debug.cs.meta new file mode 100644 index 000000000..0847f65a3 --- /dev/null +++ b/Assets/MirageXR/Common/Scripts/Logger/Debug.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4f4ddc13b64b93f489f0571e13816084 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MirageXR/Common/Scripts/Managers/CalibrationManager.cs b/Assets/MirageXR/Common/Scripts/Managers/CalibrationManager.cs index 0b0a736ce..ca197e048 100644 --- a/Assets/MirageXR/Common/Scripts/Managers/CalibrationManager.cs +++ b/Assets/MirageXR/Common/Scripts/Managers/CalibrationManager.cs @@ -102,14 +102,14 @@ private async Task EnableCalibrationAsync(bool isRecalibration = false) var value = await CreateCalibrationTool(isRecalibration); if (!value) { - AppLog.LogError("Unable to create imageTarget"); + Debug.LogError("Unable to create imageTarget"); return; } } if (!InitCalibrationTool(_imageTarget)) { - AppLog.LogError("Unable to create calibrationTool"); + Debug.LogError("Unable to create calibrationTool"); return; } @@ -136,7 +136,7 @@ private async Task CreateCalibrationTool(bool isRecalibration = false) } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); return false; } finally @@ -150,7 +150,7 @@ private bool InitCalibrationTool(IImageTarget imageTarget) _calibrationTool = imageTarget.targetObject.GetComponent(); if (!_calibrationTool) { - AppLog.LogError($"{nameof(CalibrationTool)} cannot be found"); + Debug.LogError($"{nameof(CalibrationTool)} cannot be found"); return false; } diff --git a/Assets/MirageXR/Common/Scripts/Redesign/LocalFiles.cs b/Assets/MirageXR/Common/Scripts/Redesign/LocalFiles.cs index 658c3c874..2bf49d1e1 100644 --- a/Assets/MirageXR/Common/Scripts/Redesign/LocalFiles.cs +++ b/Assets/MirageXR/Common/Scripts/Redesign/LocalFiles.cs @@ -167,7 +167,7 @@ public static bool TryGetPassword(string key, out string username, out string pa } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); return false; } } diff --git a/Assets/MirageXR/Common/Scripts/Services/MirageXRServiceBootstrapper.cs b/Assets/MirageXR/Common/Scripts/Services/MirageXRServiceBootstrapper.cs index 4cc0de2aa..d5f56b4a4 100644 --- a/Assets/MirageXR/Common/Scripts/Services/MirageXRServiceBootstrapper.cs +++ b/Assets/MirageXR/Common/Scripts/Services/MirageXRServiceBootstrapper.cs @@ -31,9 +31,9 @@ private void OnDisable() protected override void RegisterServices() { #if UNITY_EDITOR - AppLog.MinimumLogLevel = LogLevel.TRACE; + Debug.MinimumLogLevel = LogLevel.TRACE; #else - AppLog.MinimumLogLevel = LogLevel.INFO; + Debug.MinimumLogLevel = LogLevel.INFO; #endif ServiceManager.RegisterService(new WorldAnchorService()); diff --git a/Assets/MirageXR/Common/Scripts/Sketchfab/OAuth/OAuthClient.cs b/Assets/MirageXR/Common/Scripts/Sketchfab/OAuth/OAuthClient.cs index 14acf2438..45efa6640 100644 --- a/Assets/MirageXR/Common/Scripts/Sketchfab/OAuth/OAuthClient.cs +++ b/Assets/MirageXR/Common/Scripts/Sketchfab/OAuth/OAuthClient.cs @@ -6,7 +6,6 @@ using System.Threading; using System.IO; using System.Diagnostics; -using Debug = UnityEngine.Debug; using System.Net; using System.Threading.Tasks; diff --git a/Assets/MirageXR/Common/Scripts/Sketchfab/Sketchfab.cs b/Assets/MirageXR/Common/Scripts/Sketchfab/Sketchfab.cs index 0d60a78f9..ed58ddd03 100644 --- a/Assets/MirageXR/Common/Scripts/Sketchfab/Sketchfab.cs +++ b/Assets/MirageXR/Common/Scripts/Sketchfab/Sketchfab.cs @@ -234,7 +234,7 @@ private static ModelPreviewItem CreateUserPreview(SketchfabCollection sketchfabC } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); return (false, null); } } @@ -268,7 +268,7 @@ private static ModelPreviewItem CreateUserPreview(SketchfabCollection sketchfabC } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); return (false, null); } } diff --git a/Assets/MirageXR/Player/Scripts/ActionListMenu/ActionListMenu.cs b/Assets/MirageXR/Player/Scripts/ActionListMenu/ActionListMenu.cs index 9c5ef41f1..39b7cecb6 100644 --- a/Assets/MirageXR/Player/Scripts/ActionListMenu/ActionListMenu.cs +++ b/Assets/MirageXR/Player/Scripts/ActionListMenu/ActionListMenu.cs @@ -78,7 +78,7 @@ private void Start() } } - AppLog.LogTrace("Action list menu start called"); + Debug.LogTrace("Action list menu start called"); EventManager.OnInitUi += Init; EventManager.OnActivateAction += OnActivateAction; EventManager.OnDeactivateAction += OnDeactivateAction; diff --git a/Assets/MirageXR/Player/Scripts/ActionListMenu/ActivityEditor.cs b/Assets/MirageXR/Player/Scripts/ActionListMenu/ActivityEditor.cs index 0f2a0b49c..3d285adc6 100644 --- a/Assets/MirageXR/Player/Scripts/ActionListMenu/ActivityEditor.cs +++ b/Assets/MirageXR/Player/Scripts/ActionListMenu/ActivityEditor.cs @@ -138,7 +138,7 @@ public void DoUploadProcess() public void OnEditToggleChanged(bool value) { - AppLog.LogDebug("Toggle changed " + value); + Debug.LogDebug("Toggle changed " + value); if (RootObject.Instance.activityManager != null) { RootObject.Instance.activityManager.EditModeActive = value; diff --git a/Assets/MirageXR/Player/Scripts/ActivitySelection/ActivityFilter.cs b/Assets/MirageXR/Player/Scripts/ActivitySelection/ActivityFilter.cs index 325bc3ad9..1dc744299 100644 --- a/Assets/MirageXR/Player/Scripts/ActivitySelection/ActivityFilter.cs +++ b/Assets/MirageXR/Player/Scripts/ActivitySelection/ActivityFilter.cs @@ -21,7 +21,7 @@ private void OnEnable() private void OnTextUpdated(string value) { - AppLog.LogDebug($"Text updated: {value}"); + Debug.LogDebug($"Text updated: {value}"); if (string.IsNullOrEmpty(value)) { _sessionListView.SetAllItems(); diff --git a/Assets/MirageXR/Player/Scripts/ActivitySelection/SessionButton.cs b/Assets/MirageXR/Player/Scripts/ActivitySelection/SessionButton.cs index d777ce823..fd10953d1 100644 --- a/Assets/MirageXR/Player/Scripts/ActivitySelection/SessionButton.cs +++ b/Assets/MirageXR/Player/Scripts/ActivitySelection/SessionButton.cs @@ -26,14 +26,14 @@ public async void OnActivitySelected() // show loading label Loading.Instance.LoadingVisibility(true); - AppLog.LogInfo("Playing activity..."); + Debug.LogInfo("Playing activity..."); Play(); } } private async Task DownloadAsync() { - AppLog.LogInfo("Downloading session..."); + Debug.LogInfo("Downloading session..."); // reset any error _selectedListViewItem.Content.HasError = false; // indicate that the system is working @@ -42,7 +42,7 @@ private async Task DownloadAsync() bool success; Session arlemFile = _selectedListViewItem.Content.Session; - AppLog.LogInfo($"Downloading from {arlemFile.contextid}/{arlemFile.component}/{arlemFile.filearea}/{arlemFile.itemid}/{arlemFile.filename}"); + Debug.LogInfo($"Downloading from {arlemFile.contextid}/{arlemFile.component}/{arlemFile.filearea}/{arlemFile.itemid}/{arlemFile.filename}"); using (SessionDownloader downloader = new SessionDownloader($"{DBManager.domain}/pluginfile.php/{arlemFile.contextid}/{arlemFile.component}/{arlemFile.filearea}/{arlemFile.itemid}/{arlemFile.filename}", arlemFile.sessionid + ".zip")) { success = await downloader.DownloadZipFileAsync(); @@ -55,7 +55,7 @@ private async Task DownloadAsync() } catch (Exception e) { - AppLog.LogException(e); + Debug.LogException(e); success = false; } } diff --git a/Assets/MirageXR/Player/Scripts/ActivitySelection/SessionDownloader.cs b/Assets/MirageXR/Player/Scripts/ActivitySelection/SessionDownloader.cs index ed4097ab4..85f9de887 100644 --- a/Assets/MirageXR/Player/Scripts/ActivitySelection/SessionDownloader.cs +++ b/Assets/MirageXR/Player/Scripts/ActivitySelection/SessionDownloader.cs @@ -26,7 +26,7 @@ public async Task DownloadZipFileAsync() using (UnityWebRequest req = new UnityWebRequest(_downloadUrl)) { req.method = UnityWebRequest.kHttpVerbGET; - AppLog.LogInfo($"Downloading zip file to " + _zipFilePath); + Debug.LogInfo($"Downloading zip file to " + _zipFilePath); DownloadHandlerFile downloadHandler = new DownloadHandlerFile(_zipFilePath) { removeFileOnAbort = true }; req.downloadHandler = downloadHandler; await req.SendWebRequest(); @@ -38,8 +38,8 @@ public async Task DownloadZipFileAsync() public async Task UnzipFileAsync() { - AppLog.LogDebug($"Application persistent data path is {Application.persistentDataPath}"); - AppLog.LogInfo($"Unzipping zip file from {_zipFilePath} to {_targetFolder}"); + Debug.LogDebug($"Application persistent data path is {Application.persistentDataPath}"); + Debug.LogInfo($"Unzipping zip file from {_zipFilePath} to {_targetFolder}"); using (Stream stream = new FileStream(_zipFilePath, FileMode.Open)) { await ZipUtilities.ExtractZipFileAsync(stream, _targetFolder); @@ -48,10 +48,10 @@ public async Task UnzipFileAsync() public void Dispose() { - AppLog.LogTrace("Disposing session downloader"); + Debug.LogTrace("Disposing session downloader"); if (File.Exists(_zipFilePath)) { - AppLog.LogDebug($"Clean up: Deleting zip file at {_zipFilePath}"); + Debug.LogDebug($"Clean up: Deleting zip file at {_zipFilePath}"); File.Delete(_zipFilePath); } } diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/AudioPlayer/AudioPlayer.cs b/Assets/MirageXR/Player/Scripts/Augmentations/AudioPlayer/AudioPlayer.cs index 25f3fc4cf..c832f6452 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/AudioPlayer/AudioPlayer.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/AudioPlayer/AudioPlayer.cs @@ -66,14 +66,14 @@ public override bool Init(ToggleObject obj) // Check that url is not empty. if (string.IsNullOrEmpty(obj.url)) { - AppLog.LogWarning("Content URL not provided."); + Debug.LogWarning("Content URL not provided."); return false; } // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } @@ -350,7 +350,7 @@ public void CreateAudioPlayer(bool useExternalAudioSource = false, bool spatialA { audioName = audioName.Substring(0, audioName.Length - 4); } - AppLog.LogTrace("Trying to load audio: " + audioName); + Debug.LogTrace("Trying to load audio: " + audioName); AudioClip audioClip = Resources.Load(audioName, typeof(AudioClip)) as AudioClip; audioPlayer.clip = audioClip; audioPlayer.playOnAwake = false; @@ -368,7 +368,7 @@ private IEnumerator LoadAudio() // Local file string dataPath = Application.persistentDataPath; string completeAudioName = "file://" + dataPath + "/" + audioName; - AppLog.LogTrace("Trying to load audio: " + completeAudioName); + Debug.LogTrace("Trying to load audio: " + completeAudioName); WWW www = new WWW(completeAudioName); yield return www; AudioClip audioClip = www.GetAudioClip(false, false, AudioType.WAV); @@ -384,7 +384,7 @@ private IEnumerator LoadAudio() var filename = url[url.Length - 1]; var completeAudioName = "file://" + activityManager.ActivityPath + "/" + filename; - AppLog.LogTrace("Trying to load audio: " + completeAudioName); + Debug.LogTrace("Trying to load audio: " + completeAudioName); WWW www = new WWW(completeAudioName); yield return www; @@ -401,7 +401,7 @@ private IEnumerator LoadAudio() } else { - AppLog.LogWarning("The file: \n" + completeAudioName + "\n has an unknown audio type. Please use .wav or .mp3"); + Debug.LogWarning("The file: \n" + completeAudioName + "\n has an unknown audio type. Please use .wav or .mp3"); } // Online file diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/Detect/Detect.cs b/Assets/MirageXR/Player/Scripts/Augmentations/Detect/Detect.cs index e737bba37..e7f54547a 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/Detect/Detect.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/Detect/Detect.cs @@ -66,7 +66,7 @@ public override bool Init(ToggleObject obj) // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/DrawingPlayer/DrawingPlayer.cs b/Assets/MirageXR/Player/Scripts/Augmentations/DrawingPlayer/DrawingPlayer.cs index 43ff1065d..e0776f242 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/DrawingPlayer/DrawingPlayer.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/DrawingPlayer/DrawingPlayer.cs @@ -87,14 +87,14 @@ public override bool Init(ToggleObject obj) // Check that url is not empty. if (string.IsNullOrEmpty(obj.url)) { - AppLog.LogWarning("Content URL not provided."); + Debug.LogWarning("Content URL not provided."); return false; } // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } @@ -148,7 +148,7 @@ private bool LoadDrawing() } catch (Exception e) { - AppLog.LogError("An error occured during import of drawing file. Aborting. Error: " + e.Message); + Debug.LogError("An error occured during import of drawing file. Aborting. Error: " + e.Message); return false; } } diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/Glyph/GlyphItems.cs b/Assets/MirageXR/Player/Scripts/Augmentations/Glyph/GlyphItems.cs index 95e12cfa7..996a30f64 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/Glyph/GlyphItems.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/Glyph/GlyphItems.cs @@ -46,7 +46,7 @@ public override bool Init(ToggleObject obj) // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/ImageViewer/FloatingImageViewer.cs b/Assets/MirageXR/Player/Scripts/Augmentations/ImageViewer/FloatingImageViewer.cs index cea75ef77..a24610260 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/ImageViewer/FloatingImageViewer.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/ImageViewer/FloatingImageViewer.cs @@ -49,14 +49,14 @@ public override bool Init(ToggleObject obj) // Check that url is not empty. if (string.IsNullOrEmpty(obj.url)) { - AppLog.LogWarning("Content URL not provided."); + Debug.LogWarning("Content URL not provided."); return false; } // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } @@ -154,7 +154,7 @@ private async Task LoadImage() { if (!imageName.Contains('/')) { - AppLog.LogError($"Can't parse file name '{imageName}'"); + Debug.LogError($"Can't parse file name '{imageName}'"); } var fileName = imageName.Split('/').LastOrDefault(); @@ -167,7 +167,7 @@ private async Task LoadImage() if (!File.Exists(path)) { - AppLog.LogError($"File {path} doesn't exists"); + Debug.LogError($"File {path} doesn't exists"); return; } diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/ImageViewer/StaticImageViewer.cs b/Assets/MirageXR/Player/Scripts/Augmentations/ImageViewer/StaticImageViewer.cs index 0aeba2294..abcd311dc 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/ImageViewer/StaticImageViewer.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/ImageViewer/StaticImageViewer.cs @@ -32,7 +32,7 @@ public IEnumerator ActivateImageViewerRoutine() { string dataPath = Application.persistentDataPath; string completeImageName = "file://" + dataPath + "/" + ImageName; - AppLog.LogTrace("Trying to load static image from:" + completeImageName); + Debug.LogTrace("Trying to load static image from:" + completeImageName); WWW www = new WWW(completeImageName); yield return www; Texture2D imageTex = new Texture2D(4, 4, TextureFormat.DXT1, false); @@ -47,7 +47,7 @@ public IEnumerator ActivateImageViewerRoutine() var completeImageName = $"file://{RootObject.Instance.activityManager.ActivityPath}/{filename}"; - AppLog.LogTrace("Trying to load image from:" + completeImageName); + Debug.LogTrace("Trying to load image from:" + completeImageName); WWW www = new WWW(completeImageName); yield return www; diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/Label/Label.cs b/Assets/MirageXR/Player/Scripts/Augmentations/Label/Label.cs index 0d8602732..0bf155629 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/Label/Label.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/Label/Label.cs @@ -27,14 +27,14 @@ public override bool Init(ToggleObject obj) // Check if the label text is set. if (string.IsNullOrEmpty(obj.text)) { - AppLog.LogWarning("Label text not provided."); + Debug.LogWarning("Label text not provided."); return false; } // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/Model/ButtonHandler.cs b/Assets/MirageXR/Player/Scripts/Augmentations/Model/ButtonHandler.cs index 7a10daf65..2d485f01b 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/Model/ButtonHandler.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/Model/ButtonHandler.cs @@ -47,7 +47,7 @@ public void ReceiveModelClick() } else { - AppLog.LogWarning("Resource url was not parsable"); + Debug.LogWarning("Resource url was not parsable"); } } diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/Model/Model.cs b/Assets/MirageXR/Player/Scripts/Augmentations/Model/Model.cs index e00bde5a2..4ff20ac41 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/Model/Model.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/Model/Model.cs @@ -63,14 +63,14 @@ public override bool Init(ToggleObject obj) // Check that url is not empty. if (string.IsNullOrEmpty(obj.url)) { - AppLog.LogWarning("Content URL not provided."); + Debug.LogWarning("Content URL not provided."); return false; } // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } @@ -98,7 +98,7 @@ private void LoadModel(ToggleObject obj) var loadPath = Path.Combine(RootObject.Instance.activityManager.ActivityPath, obj.option, "scene.gltf"); - AppLog.LogTrace($"Loading model: {loadPath}"); + Debug.LogTrace($"Loading model: {loadPath}"); Importer.ImportGLTFAsync(loadPath, new ImportSettings(), OnFinishLoadingAsync); } @@ -111,7 +111,7 @@ private void OnFinishLoadingAsync(GameObject model, AnimationClip[] clip) return; } - AppLog.LogTrace($"Imported {model.name} in {Time.time - startLoadTime} seconds"); + Debug.LogTrace($"Imported {model.name} in {Time.time - startLoadTime} seconds"); var startPos = transform.position + transform.forward * -0.5f + transform.up * -0.1f; @@ -137,7 +137,7 @@ private void OnFinishLoadingAsync(GameObject model, AnimationClip[] clip) if (clip.Length > 0) { - AppLog.LogDebug($"Animation(s) found ({clip.Length})...isLegacy? {clip[0].legacy}"); + Debug.LogDebug($"Animation(s) found ({clip.Length})...isLegacy? {clip[0].legacy}"); animation = model.AddComponent(); animation.AddClip(clip[0], "leaning"); @@ -276,7 +276,7 @@ private void MoveAndScaleModel(GameObject modelToAdjust) } } - AppLog.LogDebug($"largest collider: {largestColliderIndex} ({colliderSize.ToString("F4")})"); + Debug.LogDebug($"largest collider: {largestColliderIndex} ({colliderSize.ToString("F4")})"); // set magnification and translation factors based on gltf info. float magnificationFactor = 0.5f / colliderSize.magnitude; @@ -298,7 +298,7 @@ private void MoveAndScaleModel(GameObject modelToAdjust) } myPoiEditor.ModelMagnification = magnificationFactor; - AppLog.LogDebug($"{modelToAdjust.name} has file mag. factor {magnificationFactor:F4}"); + Debug.LogDebug($"{modelToAdjust.name} has file mag. factor {magnificationFactor:F4}"); modelToAdjust.transform.localScale *= myPoiEditor.ModelMagnification; modelToAdjust.transform.localPosition = Vector3.zero; @@ -315,7 +315,7 @@ private void DeleteModelData(ToggleObject augmentation) if (Directory.Exists(modelFolderPath)) { - AppLog.LogTrace("found model folder (" + modelFolderPath + "). Deleting..."); + Debug.LogTrace("found model folder (" + modelFolderPath + "). Deleting..."); Utilities.DeleteAllFilesInDirectory(modelFolderPath); Directory.Delete(modelFolderPath); } diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/Plugin/PluginController.cs b/Assets/MirageXR/Player/Scripts/Augmentations/Plugin/PluginController.cs index d1e1935fd..85eec93ed 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/Plugin/PluginController.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/Plugin/PluginController.cs @@ -28,7 +28,7 @@ public override bool Init(ToggleObject obj) // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } @@ -47,7 +47,7 @@ public override bool Init(ToggleObject obj) private void loadPlugin(string path) { - AppLog.LogTrace($"Loading plugin from path {path}"); + Debug.LogTrace($"Loading plugin from path {path}"); plugin = Instantiate(Resources.Load(path), Vector3.zero, Quaternion.identity); plugin.transform.parent = gameObject.transform; // pluginParent; diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/Plugin/PluginEditor.cs b/Assets/MirageXR/Player/Scripts/Augmentations/Plugin/PluginEditor.cs index fb7d1a45d..fd0c4f34a 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/Plugin/PluginEditor.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/Plugin/PluginEditor.cs @@ -67,7 +67,7 @@ private void GenerateIconList() var rect = new Rect(0, 0, pluginTex.width, pluginTex.height); var pivot = new Vector2(0.5f, 0.5f); - AppLog.LogDebug("Plugin Name: " + plugin.name); + Debug.LogDebug("Plugin Name: " + plugin.name); var icon = Instantiate(iconPrefab, Vector3.zero, Quaternion.identity); icon.transform.FindDeepChild("Image").GetComponent().sprite = Sprite.Create(pluginTex, rect, pivot); @@ -108,7 +108,7 @@ public void Create(App plugin) _action.appIDs.Add(plugin.id); - AppLog.LogDebug("ACTION ID = " + _annotationToEdit.url); + Debug.LogDebug("ACTION ID = " + _annotationToEdit.url); EventManager.ActivateObject(_annotationToEdit); EventManager.NotifyActionModified(_action); diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/PostIt/PostItLabel.cs b/Assets/MirageXR/Player/Scripts/Augmentations/PostIt/PostItLabel.cs index 87738f458..d767d5af9 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/PostIt/PostItLabel.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/PostIt/PostItLabel.cs @@ -25,14 +25,14 @@ public override bool Init(ToggleObject obj) // Check if the label text is set. if (string.IsNullOrEmpty(obj.text)) { - AppLog.LogWarning("Label text not provided."); + Debug.LogWarning("Label text not provided."); return false; } // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/Potentiometer/Potentiometer.cs b/Assets/MirageXR/Player/Scripts/Augmentations/Potentiometer/Potentiometer.cs index 69353b0d1..949b079b3 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/Potentiometer/Potentiometer.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/Potentiometer/Potentiometer.cs @@ -11,19 +11,19 @@ public override bool Init(ToggleObject obj) // Check that all the sensor related crap is defined. if (string.IsNullOrEmpty(obj.sensor)) { - AppLog.LogWarning("Sensor is not defined."); + Debug.LogWarning("Sensor is not defined."); return false; } if (string.IsNullOrEmpty(obj.key)) { - AppLog.LogWarning("Sensor key is not defined."); + Debug.LogWarning("Sensor key is not defined."); return false; } if (string.IsNullOrEmpty(obj.option)) { - AppLog.LogWarning("Sensor option string is not defined."); + Debug.LogWarning("Sensor option string is not defined."); return false; } @@ -31,20 +31,20 @@ public override bool Init(ToggleObject obj) if (limits.Length != 2) { - AppLog.LogWarning("Sensor limits not properly set."); + Debug.LogWarning("Sensor limits not properly set."); return false; } if (!float.TryParse(limits[0], out float min)) { - AppLog.LogWarning("Minimum value is not a float."); + Debug.LogWarning("Minimum value is not a float."); return false; } if (!float.TryParse(limits[1], out float max)) { - AppLog.LogWarning("Maximum value is not a float."); + Debug.LogWarning("Maximum value is not a float."); return false; } @@ -52,14 +52,14 @@ public override bool Init(ToggleObject obj) if (!controller.AttachStream(obj.sensor, obj.key, min, max)) { - AppLog.LogWarning("Couldn't attach sensor stream."); + Debug.LogWarning("Couldn't attach sensor stream."); return false; } // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/Symbol/Symbol.cs b/Assets/MirageXR/Player/Scripts/Augmentations/Symbol/Symbol.cs index 241cfa321..f93487cf5 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/Symbol/Symbol.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/Symbol/Symbol.cs @@ -19,7 +19,7 @@ public override bool Init(ToggleObject obj) // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } @@ -40,7 +40,7 @@ public override bool Init(ToggleObject obj) // If symbol couldn't be found, terminate initialization. if (symbol == null) { - AppLog.LogWarning("Symbol couldn't be found. " + obj.predicate); + Debug.LogWarning("Symbol couldn't be found. " + obj.predicate); return false; } @@ -61,7 +61,7 @@ public override bool Init(ToggleObject obj) { // If the animation type is unknown, terminate the initialization. default: - AppLog.LogWarning("Unknown animation type. " + animationId); + Debug.LogWarning("Unknown animation type. " + animationId); return false; // For rotation types. diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/UiSymbol/UiSymbol.cs b/Assets/MirageXR/Player/Scripts/Augmentations/UiSymbol/UiSymbol.cs index c0395aa2c..bf6edfdda 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/UiSymbol/UiSymbol.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/UiSymbol/UiSymbol.cs @@ -27,7 +27,7 @@ public override bool Init(ToggleObject content) // If symbol couldn't be found, terminate initialization. if (symbol == null) { - AppLog.LogWarning("Symbol couldn't be found. " + content.predicate); + Debug.LogWarning("Symbol couldn't be found. " + content.predicate); return false; } diff --git a/Assets/MirageXR/Player/Scripts/Augmentations/VideoViewer/FloatingVideoViewer.cs b/Assets/MirageXR/Player/Scripts/Augmentations/VideoViewer/FloatingVideoViewer.cs index 38b44b9ec..cacbbaaf6 100644 --- a/Assets/MirageXR/Player/Scripts/Augmentations/VideoViewer/FloatingVideoViewer.cs +++ b/Assets/MirageXR/Player/Scripts/Augmentations/VideoViewer/FloatingVideoViewer.cs @@ -94,7 +94,7 @@ public override bool Init(ToggleObject content) // Check that url is not empty. if (string.IsNullOrEmpty(content.url)) { - AppLog.LogWarning("Content URL not provided."); + Debug.LogWarning("Content URL not provided."); return false; } diff --git a/Assets/MirageXR/Player/Scripts/Behaviours/DeviceMqttBehaviour.cs b/Assets/MirageXR/Player/Scripts/Behaviours/DeviceMqttBehaviour.cs index 669c1c85d..445553ee1 100644 --- a/Assets/MirageXR/Player/Scripts/Behaviours/DeviceMqttBehaviour.cs +++ b/Assets/MirageXR/Player/Scripts/Behaviours/DeviceMqttBehaviour.cs @@ -106,7 +106,7 @@ public async Task Init(Sensor sensor) try { await _mqtt.ConnectAsync(url, port, _sensor.username, _sensor.password, clientId); - AppLog.LogInfo(_sensor.id + " connected."); + Debug.LogInfo(_sensor.id + " connected."); } catch { @@ -120,7 +120,7 @@ public async Task Init(Sensor sensor) try { await _mqtt.ConnectAsync(url, port, _sensor.username, _sensor.password, clientId); - AppLog.LogInfo(_sensor.id + " connected."); + Debug.LogInfo(_sensor.id + " connected."); } catch { @@ -150,7 +150,7 @@ private void ConnectionLost(bool success) private async void ConnectionEstablishedRoutine() { - AppLog.LogInfo("Connection established."); + Debug.LogInfo("Connection established."); // Instantiate a sensor container. // _sensorDisplay.name = _sensor.id; diff --git a/Assets/MirageXR/Player/Scripts/Behaviours/HumEnvMqttBehaviour.cs b/Assets/MirageXR/Player/Scripts/Behaviours/HumEnvMqttBehaviour.cs index cb7be2a01..61ed69e45 100644 --- a/Assets/MirageXR/Player/Scripts/Behaviours/HumEnvMqttBehaviour.cs +++ b/Assets/MirageXR/Player/Scripts/Behaviours/HumEnvMqttBehaviour.cs @@ -58,7 +58,7 @@ public async Task Init(Sensor sensor) { _sensor = sensor; - AppLog.LogTrace("Starting connection to sensors..."); + Debug.LogTrace("Starting connection to sensors..."); // Generate randomized client id. var clientId = "WEKIT-"; @@ -68,7 +68,7 @@ public async Task Init(Sensor sensor) if (!fullUri.StartsWith("mqtt://")) { - AppLog.LogWarning("Tried to create sensor without mqtt connection: " + _sensor.id); + Debug.LogWarning("Tried to create sensor without mqtt connection: " + _sensor.id); return false; } @@ -79,7 +79,7 @@ public async Task Init(Sensor sensor) if (uriComponents.Length != 2) { - AppLog.LogWarning("Sensor uri doesn't contain proper url + port definition: " + _sensor.id); + Debug.LogWarning("Sensor uri doesn't contain proper url + port definition: " + _sensor.id); return false; } @@ -90,7 +90,7 @@ public async Task Init(Sensor sensor) { if (string.IsNullOrEmpty(_sensor.password)) { - AppLog.LogWarning("Sensor connection username without a password: " + _sensor.id); + Debug.LogWarning("Sensor connection username without a password: " + _sensor.id); return false; } diff --git a/Assets/MirageXR/Player/Scripts/Character Aug/CharacterController.cs b/Assets/MirageXR/Player/Scripts/Character Aug/CharacterController.cs index 2b6453971..b0be8f012 100644 --- a/Assets/MirageXR/Player/Scripts/Character Aug/CharacterController.cs +++ b/Assets/MirageXR/Player/Scripts/Character Aug/CharacterController.cs @@ -136,7 +136,7 @@ public override bool Init(ToggleObject obj) // Try to set the parent and if it fails, terminate initialization. if (!SetParent(obj)) { - AppLog.LogWarning("Couldn't set the parent."); + Debug.LogWarning("Couldn't set the parent."); return false; } @@ -903,7 +903,7 @@ public async void SelectClip(string clip = null) if (animationMenu.value >= animationMenu.options.Count || animationMenu.value < 0) { - AppLog.LogError("animationMenu.options: out of range"); + Debug.LogError("animationMenu.options: out of range"); return; } var clipName = animationMenu.options[animationMenu.value].text; @@ -1095,7 +1095,7 @@ public async Task ParseCharacters(string jsonPath) if (character.steps.Count == 0) { gameObject.SetActive(false); - AppLog.LogError("The character augmentation has had a major change. Please recreate the existing characters."); + Debug.LogError("The character augmentation has had a major change. Please recreate the existing characters."); return false; } @@ -1326,7 +1326,7 @@ private IEnumerator OnImageDisplayIntro(bool visibility) } catch (NullReferenceException e) { - AppLog.LogError($"Some references are missing on display image animation part. f.exp imageContainer,MyImageAnnotation ,etc. {e}"); + Debug.LogError($"Some references are missing on display image animation part. f.exp imageContainer,MyImageAnnotation ,etc. {e}"); } } diff --git a/Assets/MirageXR/Player/Scripts/IBMWatson/DaimonManager.cs b/Assets/MirageXR/Player/Scripts/IBMWatson/DaimonManager.cs index f37eb1a16..915e1e769 100644 --- a/Assets/MirageXR/Player/Scripts/IBMWatson/DaimonManager.cs +++ b/Assets/MirageXR/Player/Scripts/IBMWatson/DaimonManager.cs @@ -39,7 +39,7 @@ IEnumerator Look(float preDelay, float duration, GameObject lookTarget) { yield return new WaitForSeconds(preDelay); - AppLog.LogTrace("Look=" + "LEFT/RIGHT"); + Debug.LogTrace("Look=" + "LEFT/RIGHT"); yield return new WaitForSeconds(duration); } @@ -59,7 +59,7 @@ void Update() { //check that clip is not playing - AppLog.LogInfo("-------------------- Speech Output has finished playing, now reactivating SpeechInput."); + Debug.LogInfo("-------------------- Speech Output has finished playing, now reactivating SpeechInput."); check = false; if (triggerNext) diff --git a/Assets/MirageXR/Player/Scripts/IBMWatson/DialogueService.cs b/Assets/MirageXR/Player/Scripts/IBMWatson/DialogueService.cs index f4053b925..031865d42 100644 --- a/Assets/MirageXR/Player/Scripts/IBMWatson/DialogueService.cs +++ b/Assets/MirageXR/Player/Scripts/IBMWatson/DialogueService.cs @@ -111,7 +111,7 @@ private IEnumerator CreateService() private IEnumerator CreateSession() { - AppLog.LogInfo("CONNECTING TO ASSISTANT: " + assistantId); + Debug.LogInfo("CONNECTING TO ASSISTANT: " + assistantId); service.CreateSession(OnCreateSession, assistantId); while (!createSessionTested) @@ -129,7 +129,7 @@ private void OnDeleteSession(DetailedResponse response, IBMError error) public void SendMessageToAssistant(string theText) { - AppLog.LogDebug("Sending to assistant service: " + theText); + Debug.LogDebug("Sending to assistant service: " + theText); if (createSessionTested) { service.Message(OnResponseReceived, assistantId, sessionId, input: new MessageInput() @@ -145,7 +145,7 @@ public void SendMessageToAssistant(string theText) } else { - AppLog.LogWarning("trying to SendMessageToAssistant before session is established."); + Debug.LogWarning("trying to SendMessageToAssistant before session is established."); } } @@ -163,14 +163,14 @@ private void OnResponseReceived(DetailedResponse response, IBME if (response.Result.Output.Generic != null && response.Result.Output.Generic.Count > 0) { - AppLog.LogDebug("DialogueService response: " + response.Result.Output.Generic[0].Text); - if (response.Result.Output.Intents.Capacity > 0) AppLog.LogDebug(" -> " + response.Result.Output.Intents[0].Intent.ToString()); + Debug.LogDebug("DialogueService response: " + response.Result.Output.Generic[0].Text); + if (response.Result.Output.Intents.Capacity > 0) Debug.LogDebug(" -> " + response.Result.Output.Intents[0].Intent.ToString()); } // check if Watson was able to make sense of the user input, otherwise ask to repeat the input if (response.Result.Output.Intents == null && response.Result.Output.Actions == null) { - AppLog.LogDebug("I did not understand"); + Debug.LogDebug("I did not understand"); dSpeechOutputMgr.Speak("I don't understand, can you rephrase?"); } @@ -195,7 +195,7 @@ private void OnResponseReceived(DetailedResponse response, IBME break; case "name": username = response.Result.Output.Entities.Find((x) => x.Entity.ToString() == "sys-person").Value.ToString(); - AppLog.LogDebug("username = " + username); + Debug.LogDebug("username = " + username); break; default: break; @@ -206,13 +206,13 @@ private void OnResponseReceived(DetailedResponse response, IBME if (response.Result.Output.Actions != null && response.Result.Output.Actions.Count > 0) { string actionName = response.Result.Output.Actions[0].Name; - AppLog.LogDebug("Action Name = " + actionName); + Debug.LogDebug("Action Name = " + actionName); // check whether it is really the intent we want to check // (or do we want to know the name of the dialogue step?) switch (actionName) { case "jump to": - AppLog.LogTrace("Jump to action recieved"); + Debug.LogTrace("Jump to action recieved"); break; default: break; @@ -250,7 +250,7 @@ private void OnResponseReceived(DetailedResponse response, IBME { dAImgr.check = true; dSpeechOutputMgr.Speak("I don't understand, can you rephrase?"); - AppLog.LogError($"Somthing went wrong but the conversiontion will be continued. The error is:\n {e}"); + Debug.LogError($"Somthing went wrong but the conversiontion will be continued. The error is:\n {e}"); } } @@ -364,10 +364,10 @@ public void OnInputReceived(string text) public void OnDestroy() { - AppLog.LogTrace("DialogueService: deregestering callback for speech2text input"); + Debug.LogTrace("DialogueService: deregestering callback for speech2text input"); dSpeechInputMgr.onInputReceived -= OnInputReceived; - AppLog.LogTrace("DialogueService: Attempting to delete session"); + Debug.LogTrace("DialogueService: Attempting to delete session"); service.DeleteSession(OnDeleteSession, assistantId, sessionId); } diff --git a/Assets/MirageXR/Player/Scripts/IBMWatson/SpeechOutputService.cs b/Assets/MirageXR/Player/Scripts/IBMWatson/SpeechOutputService.cs index 0afacdf70..bcd879c1c 100644 --- a/Assets/MirageXR/Player/Scripts/IBMWatson/SpeechOutputService.cs +++ b/Assets/MirageXR/Player/Scripts/IBMWatson/SpeechOutputService.cs @@ -68,7 +68,7 @@ private IEnumerator ConnectToTTSService() public void Speak(string text) { - AppLog.LogTrace("Sending to Watson to generate voice audio output: " + text); + Debug.LogTrace("Sending to Watson to generate voice audio output: " + text); if (text != null && text != "") { myService.Synthesize( @@ -80,7 +80,7 @@ public void Speak(string text) } else { - AppLog.LogWarning("Text to speech: text was empty"); + Debug.LogWarning("Text to speech: text was empty"); } } @@ -92,7 +92,7 @@ public void onSynthCompleted(DetailedResponse response, IBMError error) AudioClip clip = null; synthesizeResponse = response.Result; clip = WaveFile.ParseWAV("myClip", synthesizeResponse); - AppLog.LogDebug("before playing: " + clip); + Debug.LogDebug("before playing: " + clip); PlayClip(clip); } @@ -113,12 +113,12 @@ private void PlayClip(AudioClip clip) dDaimonMgr.wait = clip.length; // may be useful to add +0.5f dDaimonMgr.check = true; - AppLog.LogDebug("Speech output playing, set DaimonMgr waiting time for SpeechInput to reactivate again (when done) after " + clip.length + " seconds"); + Debug.LogDebug("Speech output playing, set DaimonMgr waiting time for SpeechInput to reactivate again (when done) after " + clip.length + " seconds"); } else { - AppLog.LogError("Something is already playing or we did not get a clip."); + Debug.LogError("Something is already playing or we did not get a clip."); } } diff --git a/Assets/MirageXR/Player/Scripts/Managers/Activity/ActivityManager.cs b/Assets/MirageXR/Player/Scripts/Managers/Activity/ActivityManager.cs index 567f67a3a..c19dc9a1e 100644 --- a/Assets/MirageXR/Player/Scripts/Managers/Activity/ActivityManager.cs +++ b/Assets/MirageXR/Player/Scripts/Managers/Activity/ActivityManager.cs @@ -201,7 +201,7 @@ public async Task StartActivity() } catch (Exception e) { - AppLog.LogException(e); + Debug.LogException(e); } _isSwitching = false; EventManager.DebugLog($"Activity manager: Starting Activity: {_activity.id}"); @@ -238,7 +238,7 @@ public async Task StartActivity() catch (Exception e) { Maggie.Error(); - AppLog.LogException(e); + Debug.LogException(e); } } } @@ -290,7 +290,7 @@ private async Task ActivateAction(string id) { Maggie.Error(); EventManager.DebugLog($"Error: Activity manager: Couldn't activate action: {id}."); - AppLog.LogException(e); + Debug.LogException(e); } } @@ -588,7 +588,7 @@ private async Task BackAction(string id) { Maggie.Error(); EventManager.DebugLog($"Error: Activity manager: Couldn't force start action: {id}."); - AppLog.LogException(e); + Debug.LogException(e); throw; } } @@ -675,7 +675,7 @@ public async Task AddActionToBegin(Vector3 position, bool hasImageMarker = false _activity.start = newAction.id; _activity.actions.Insert(0, newAction); - AppLog.LogDebug($"Added {newAction.id} to list of task stations"); + Debug.LogDebug($"Added {newAction.id} to list of task stations"); RegenerateActionsList(); await ActivateNextAction(); @@ -731,7 +731,7 @@ public async Task AddAction(Vector3 position, bool hasImageMarker = false) } else { - AppLog.LogError("Could not identify the active action"); + Debug.LogError("Could not identify the active action"); } } else @@ -741,7 +741,7 @@ public async Task AddAction(Vector3 position, bool hasImageMarker = false) _activity.actions.Insert(indexOfActive + 1, newAction); - AppLog.LogDebug($"Added {newAction.id} to list of task stations"); + Debug.LogDebug($"Added {newAction.id} to list of task stations"); RegenerateActionsList(); await ActivateNextAction(); @@ -786,17 +786,17 @@ public void DeleteAction(string idToDelete) if (indexToDelete < 0) { - AppLog.LogError($"Could not remove {idToDelete} since the id could not be found in the list of actions"); + Debug.LogError($"Could not remove {idToDelete} since the id could not be found in the list of actions"); return; } int totalNumberOfActions = _activity.actions.Count; - AppLog.LogInfo($"Deleting action with index {indexToDelete}..."); + Debug.LogInfo($"Deleting action with index {indexToDelete}..."); if (indexToDelete == totalNumberOfActions - 1) // if deleting the last action { - AppLog.LogTrace("deleting last action"); + Debug.LogTrace("deleting last action"); if (totalNumberOfActions != 1) { @@ -808,7 +808,7 @@ public void DeleteAction(string idToDelete) } else if (indexToDelete == 0) // if deleting the first action { - AppLog.LogTrace("deleting first action"); + Debug.LogTrace("deleting first action"); // update start action with the one that is currently second (prior to deleting the action, in this case) if (totalNumberOfActions > 1) { diff --git a/Assets/MirageXR/Player/Scripts/Managers/DebugManager.cs b/Assets/MirageXR/Player/Scripts/Managers/DebugManager.cs index e80e9ac4a..f7c0921ff 100644 --- a/Assets/MirageXR/Player/Scripts/Managers/DebugManager.cs +++ b/Assets/MirageXR/Player/Scripts/Managers/DebugManager.cs @@ -29,12 +29,12 @@ private void Start() { if (DebugText == null) { - AppLog.LogError("Debug manager error: Debug text not found. Please add one in editor."); + Debug.LogError("Debug manager error: Debug text not found. Please add one in editor."); } if (DeviceInfo == null) { - AppLog.LogError("Debug manager error: Device info text not found. Please add one in editor."); + Debug.LogError("Debug manager error: Device info text not found. Please add one in editor."); } DeviceInfo.text = SystemInfo.deviceUniqueIdentifier; diff --git a/Assets/MirageXR/Player/Scripts/Managers/EventManager.cs b/Assets/MirageXR/Player/Scripts/Managers/EventManager.cs index 934a43141..d053c868e 100644 --- a/Assets/MirageXR/Player/Scripts/Managers/EventManager.cs +++ b/Assets/MirageXR/Player/Scripts/Managers/EventManager.cs @@ -196,7 +196,7 @@ public static void DeactivateObject(ToggleObject action) /// Debug message. public static void DebugLog(string debug) { - AppLog.LogInfo(debug); + Debug.LogInfo(debug); OnDebugLog?.Invoke(debug); } @@ -295,7 +295,7 @@ public static void ClearAll() public static void InitUi() { - AppLog.LogTrace("Init UI invoked"); + Debug.LogTrace("Init UI invoked"); OnInitUi?.Invoke(); } @@ -537,7 +537,7 @@ public static void ActivityLoadedStamp(string deviceId, string activityId, strin { OnActivityLoadedStamp?.Invoke(deviceId, activityId, timestamp); - AppLog.LogInfo($"LOADED STAMP: {deviceId}, {activityId}, {timestamp}"); + Debug.LogInfo($"LOADED STAMP: {deviceId}, {activityId}, {timestamp}"); } public delegate void ActivityCompletedStampDelegate(string deviceId, string activityId, string timestamp); @@ -548,7 +548,7 @@ public static void ActivityCompletedStamp(string deviceId, string activityId, st { OnActivityCompletedStamp?.Invoke(deviceId, activityId, timestamp); - AppLog.LogInfo($"COMPLETED STAMP: {deviceId}, {activityId}, {timestamp}"); + Debug.LogInfo($"COMPLETED STAMP: {deviceId}, {activityId}, {timestamp}"); } public delegate void StepActivatedStampDelegate(string deviceId, Action activatedAction, string timestamp); @@ -559,7 +559,7 @@ public static void StepActivatedStamp(string deviceId, Action activatedAction, s { OnStepActivatedStamp?.Invoke(deviceId, activatedAction, timestamp); - AppLog.LogInfo($"ACTIVATED STAMP: {deviceId}, {activatedAction.id}, {timestamp}"); + Debug.LogInfo($"ACTIVATED STAMP: {deviceId}, {activatedAction.id}, {timestamp}"); } public delegate void StepDeactivatedStampDelegate(string deviceId, Action deactivatedAction, string timestamp); @@ -570,7 +570,7 @@ public static void StepDeactivatedStamp(string deviceId, Action deactivatedActio { OnStepDeactivatedStamp?.Invoke(deviceId, deactivatedAction, timestamp); - AppLog.LogInfo("DEACTIVATED STAMP: " + deviceId + ", " + deactivatedAction.id + ", " + timestamp); + Debug.LogInfo("DEACTIVATED STAMP: " + deviceId + ", " + deactivatedAction.id + ", " + timestamp); } public delegate void ShowActivitySelectionMenuDelegate(); diff --git a/Assets/MirageXR/Player/Scripts/Managers/ObjectFactory.cs b/Assets/MirageXR/Player/Scripts/Managers/ObjectFactory.cs index 4b72812af..898b8515c 100644 --- a/Assets/MirageXR/Player/Scripts/Managers/ObjectFactory.cs +++ b/Assets/MirageXR/Player/Scripts/Managers/ObjectFactory.cs @@ -245,7 +245,7 @@ private static void Toggle(ToggleObject obj, bool isActivating) // Ghost hands type. case "hands": if (isActivating) - AppLog.LogInfo("hands activated"); + Debug.LogInfo("hands activated"); // ActivatePrefab("HandsPrefab", obj); // else // DestroyPrefab(obj); diff --git a/Assets/MirageXR/Player/Scripts/Managers/PlatformManager.cs b/Assets/MirageXR/Player/Scripts/Managers/PlatformManager.cs index 8fdf121e0..e4578b0f2 100644 --- a/Assets/MirageXR/Player/Scripts/Managers/PlatformManager.cs +++ b/Assets/MirageXR/Player/Scripts/Managers/PlatformManager.cs @@ -132,7 +132,7 @@ private static float GetDeviceDiagonalSizeInInches() var screenHeight = Screen.height / Screen.dpi; var diagonalInches = Mathf.Sqrt(Mathf.Pow(screenWidth, 2) + Mathf.Pow(screenHeight, 2)); - AppLog.LogDebug("Getting device inches: " + diagonalInches); + Debug.LogDebug("Getting device inches: " + diagonalInches); return diagonalInches; } diff --git a/Assets/MirageXR/Player/Scripts/Managers/TutorialManager.cs b/Assets/MirageXR/Player/Scripts/Managers/TutorialManager.cs index 1f0abe1d4..de0fe47bb 100644 --- a/Assets/MirageXR/Player/Scripts/Managers/TutorialManager.cs +++ b/Assets/MirageXR/Player/Scripts/Managers/TutorialManager.cs @@ -97,7 +97,7 @@ private void Awake() { if (Instance != null) { - AppLog.LogError($"{Instance.GetType().FullName} must only be a single copy!"); + Debug.LogError($"{Instance.GetType().FullName} must only be a single copy!"); return; } @@ -163,7 +163,7 @@ public void StartTutorial(TutorialType type) } else { - AppLog.LogError("Tried to start unknown tutorial type."); + Debug.LogError("Tried to start unknown tutorial type."); } } diff --git a/Assets/MirageXR/Player/Scripts/Managers/Workplace/WorkplaceObjectFactory.cs b/Assets/MirageXR/Player/Scripts/Managers/Workplace/WorkplaceObjectFactory.cs index d69ccd08b..7c94dfebd 100644 --- a/Assets/MirageXR/Player/Scripts/Managers/Workplace/WorkplaceObjectFactory.cs +++ b/Assets/MirageXR/Player/Scripts/Managers/Workplace/WorkplaceObjectFactory.cs @@ -34,7 +34,7 @@ public static void CreateDetectables(List list, string debug) catch (Exception e) { EventManager.DebugLog($"Error: Workplace manager: Couldn't create {debug}."); - AppLog.LogException(e); + Debug.LogException(e); } EventManager.DebugLog($"Workplace manager: {debug} created."); @@ -52,7 +52,7 @@ public static async Task CreatePlaces(List list, string debug) catch (Exception e) { EventManager.DebugLog($"Error: Workplace manager: Couldn't create {debug}."); - AppLog.LogException(e); + Debug.LogException(e); } EventManager.DebugLog($"Workplace manager: {debug} created."); @@ -112,7 +112,7 @@ public static async void CreateSensors() { Maggie.Speak("Error while trying to connect to sensor " + sensor.id); EventManager.DebugLog("Error: Workplace manager: Couldn't create sensor objects."); - AppLog.LogException(e); + Debug.LogException(e); throw; } } @@ -231,7 +231,7 @@ public static async Task CreateThings() { // If sensor poi found, link sensor display to sensor poi. sensor.GetComponent().LinkDisplay(sensorPoi.transform); - AppLog.LogDebug("Sensor poi"); + Debug.LogDebug("Sensor poi"); } else @@ -239,14 +239,14 @@ public static async Task CreateThings() // If sensor poi not found, link to default poi. var defaultPoi = GameObject.Find(thing.id + "/default"); sensor.GetComponent().LinkDisplay(defaultPoi.transform); - AppLog.LogDebug("Default poi"); + Debug.LogDebug("Default poi"); } } } catch (Exception e) { EventManager.DebugLog("Error: Workplace manager: Couldn't create thing object: " + thing.id); - AppLog.LogException(e); + Debug.LogException(e); throw; } } @@ -352,7 +352,7 @@ public static async Task CreatePersons() catch (Exception e) { EventManager.DebugLog("Error: Workplace manager: Couldn't create person objects."); - AppLog.LogException(e); + Debug.LogException(e); throw; } } @@ -382,7 +382,7 @@ public static void CreateDevices() catch (Exception e) { EventManager.DebugLog("Error: Workplace manager: Couldn't attach user to current device."); - AppLog.LogException(e); + Debug.LogException(e); throw; } } @@ -398,7 +398,7 @@ public static void CreateDetectableObject(Detectable detectable, bool newObject) return; } - AppLog.LogInfo($"Creating Detectable Object:{detectable.id}\nPosition:{detectable.origin_position}\nRotation:{detectable.origin_rotation}"); + Debug.LogInfo($"Creating Detectable Object:{detectable.id}\nPosition:{detectable.origin_position}\nRotation:{detectable.origin_rotation}"); switch (detectable.type) { @@ -447,11 +447,11 @@ public static void CreateDetectableObject(Detectable detectable, bool newObject) // Vuforia image targets. case "image": { - AppLog.LogError("Support for Vuforia image targets has been removed"); + Debug.LogError("Support for Vuforia image targets has been removed"); /*var path = Path.Combine(Application.persistentDataPath, workplaceManager.workplace.id, "/detectables/", detectable.id, detectable.id, ".xml"); - AppLog.LogDebug("VUFORIA PATH: " + path); + Debug.LogDebug("VUFORIA PATH: " + path); // Check that we have the data set file. if (!DataSet.Exists(path, VuforiaUnity.StorageType.STORAGE_ABSOLUTE)) @@ -651,7 +651,7 @@ public static void CreatePoiObject(Poi poi, Transform parent) } else { - AppLog.LogError("Problem interpreting rotation value"); + Debug.LogError("Problem interpreting rotation value"); } } @@ -663,7 +663,7 @@ public static void CreatePoiObject(Poi poi, Transform parent) } else { - AppLog.LogError("Problem interpreting poi scale value"); + Debug.LogError("Problem interpreting poi scale value"); } } diff --git a/Assets/MirageXR/Player/Scripts/Messages/ArlemMessage.cs b/Assets/MirageXR/Player/Scripts/Messages/ArlemMessage.cs index faafd6dcb..1e2090dba 100644 --- a/Assets/MirageXR/Player/Scripts/Messages/ArlemMessage.cs +++ b/Assets/MirageXR/Player/Scripts/Messages/ArlemMessage.cs @@ -20,13 +20,13 @@ private static void Read(string target, string message) { if (string.IsNullOrEmpty(target)) { - AppLog.LogWarning("Message target not set."); + Debug.LogWarning("Message target not set."); return; } if (string.IsNullOrEmpty(message)) { - AppLog.LogWarning("Message text not set."); + Debug.LogWarning("Message text not set."); return; } diff --git a/Assets/MirageXR/Player/Scripts/Mobile/ContentEditors/ModelEditorView.cs b/Assets/MirageXR/Player/Scripts/Mobile/ContentEditors/ModelEditorView.cs index 2060dacfb..776d20838 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/ContentEditors/ModelEditorView.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/ContentEditors/ModelEditorView.cs @@ -87,7 +87,7 @@ public override void Initialization(Action onClose, params object[] a } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); } } @@ -116,7 +116,7 @@ private void ResetView() } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); } } @@ -147,7 +147,7 @@ private async Task RenewTokenAsync() } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); } } @@ -179,7 +179,7 @@ private bool CheckAndLoadCredentials() } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); return false; } } @@ -317,7 +317,7 @@ private async void SearchRemote() } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); } } @@ -359,7 +359,7 @@ private async void OnLoadMoreButtonClicked() } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); } } @@ -385,7 +385,7 @@ private void Clear() } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); } } @@ -480,7 +480,7 @@ private async void LoginToSketchfab() } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); } } @@ -566,7 +566,7 @@ private async Task DownloadItemAsync(ModelListItem item) } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); } Toast.Instance.Show("Download error. Please, try again."); diff --git a/Assets/MirageXR/Player/Scripts/Mobile/ContentEditors/PopupEditorBase.cs b/Assets/MirageXR/Player/Scripts/Mobile/ContentEditors/PopupEditorBase.cs index e54ca14a6..df0bd0ceb 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/ContentEditors/PopupEditorBase.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/ContentEditors/PopupEditorBase.cs @@ -49,7 +49,7 @@ protected virtual Vector3 GetOffset() var originT = GameObject.Find(detectable.id); // TODO: replace by direct reference to the object if (!originT) { - AppLog.LogError($"Can't find detectable {detectable.id}"); + Debug.LogError($"Can't find detectable {detectable.id}"); return annotationStartingPoint.transform.position; } @@ -57,7 +57,7 @@ protected virtual Vector3 GetOffset() if (!detectableBehaviour) { - AppLog.LogError($"Can't find DetectableBehaviour"); + Debug.LogError($"Can't find DetectableBehaviour"); return annotationStartingPoint.transform.position; } diff --git a/Assets/MirageXR/Player/Scripts/Mobile/ContentListItem.cs b/Assets/MirageXR/Player/Scripts/Mobile/ContentListItem.cs index 80fca8d0a..d1a7790f0 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/ContentListItem.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/ContentListItem.cs @@ -86,7 +86,7 @@ private void OnContentClick() var editor = _parentView.editors.FirstOrDefault(t => t.editorForType == type); if (editor == null) { - AppLog.LogError($"there is no editor for the type {type}"); + Debug.LogError($"there is no editor for the type {type}"); return; } PopupsViewer.Instance.Show(editor, _parentView.currentStep, _content); diff --git a/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogViewBottomInputField.cs b/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogViewBottomInputField.cs index 09af2b9ea..412e84882 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogViewBottomInputField.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogViewBottomInputField.cs @@ -14,7 +14,7 @@ public override void UpdateView(DialogModel model) { if (model.contents.Count != 2) { - AppLog.LogError("buttons content does not equal 2"); + Debug.LogError("buttons content does not equal 2"); return; } diff --git a/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogViewMiddle.cs b/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogViewMiddle.cs index 6548db1ee..d22e75c7c 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogViewMiddle.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogViewMiddle.cs @@ -20,7 +20,7 @@ public override void UpdateView(DialogModel model) if (model.contents.Count != 2) { - AppLog.LogError("buttons content does not equal 2"); + Debug.LogError("buttons content does not equal 2"); return; } diff --git a/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogWindow.cs b/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogWindow.cs index 6fc4f3efb..779cabe3d 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogWindow.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/DialogWindow/DialogWindow.cs @@ -29,7 +29,7 @@ protected void Awake() { if (Instance != null) { - AppLog.LogError($"{Instance.GetType().FullName} must only be a single copy!"); + Debug.LogError($"{Instance.GetType().FullName} must only be a single copy!"); return; } diff --git a/Assets/MirageXR/Player/Scripts/Mobile/LoadView.cs b/Assets/MirageXR/Player/Scripts/Mobile/LoadView.cs index 36d029cc8..60f824275 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/LoadView.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/LoadView.cs @@ -15,7 +15,7 @@ private void Awake() { if (Instance != null) { - AppLog.LogError($"{nameof(LoadView)} must only be a single copy!"); + Debug.LogError($"{nameof(LoadView)} must only be a single copy!"); return; } diff --git a/Assets/MirageXR/Player/Scripts/Mobile/Popup/ContentSelectorView.cs b/Assets/MirageXR/Player/Scripts/Mobile/Popup/ContentSelectorView.cs index e88d83ce5..8df9c6dfe 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/Popup/ContentSelectorView.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/Popup/ContentSelectorView.cs @@ -42,7 +42,7 @@ private void OnListItemClick(ContentType type) var editor = _editors.FirstOrDefault(t => t.editorForType == type); if (editor == null) { - AppLog.LogError($"there is no editor for the type {type}"); + Debug.LogError($"there is no editor for the type {type}"); return; } PopupsViewer.Instance.Show(editor, _currentStep); diff --git a/Assets/MirageXR/Player/Scripts/Mobile/Popup/PopupBase.cs b/Assets/MirageXR/Player/Scripts/Mobile/Popup/PopupBase.cs index 07f45dc91..8c97e550b 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/Popup/PopupBase.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/Popup/PopupBase.cs @@ -21,7 +21,7 @@ public virtual void Initialization(Action onClose, params object[] ar _onClose = onClose; if (!TryToGetArguments(args)) { - AppLog.LogError("error when trying to get arguments!"); + Debug.LogError("error when trying to get arguments!"); } } diff --git a/Assets/MirageXR/Player/Scripts/Mobile/PopupsViewer.cs b/Assets/MirageXR/Player/Scripts/Mobile/PopupsViewer.cs index f5cfa8bdb..b4d27f731 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/PopupsViewer.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/PopupsViewer.cs @@ -16,7 +16,7 @@ private void Awake() { if (Instance != null) { - AppLog.LogError($"{Instance.GetType().FullName} must only be a single copy!"); + Debug.LogError($"{Instance.GetType().FullName} must only be a single copy!"); return; } @@ -93,7 +93,7 @@ private void OnClose(PopupBase popup) { if (_stack.Count <= 0) { - AppLog.LogError("Stack is empty!"); + Debug.LogError("Stack is empty!"); return; } diff --git a/Assets/MirageXR/Player/Scripts/Mobile/RootView.cs b/Assets/MirageXR/Player/Scripts/Mobile/RootView.cs index 5a8b784a3..e42d2bc94 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/RootView.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/RootView.cs @@ -29,7 +29,7 @@ private void Awake() { if (Instance != null) { - AppLog.LogError($"{Instance.GetType().FullName} must only be a single copy!"); + Debug.LogError($"{Instance.GetType().FullName} must only be a single copy!"); return; } diff --git a/Assets/MirageXR/Player/Scripts/Mobile/Toast.cs b/Assets/MirageXR/Player/Scripts/Mobile/Toast.cs index b1264c2b0..1fa1f8935 100644 --- a/Assets/MirageXR/Player/Scripts/Mobile/Toast.cs +++ b/Assets/MirageXR/Player/Scripts/Mobile/Toast.cs @@ -28,7 +28,7 @@ private void Awake() { if (Instance != null) { - AppLog.LogError($"{Instance.GetType().FullName} must only be a single copy!"); + Debug.LogError($"{Instance.GetType().FullName} must only be a single copy!"); return; } diff --git a/Assets/MirageXR/Player/Scripts/Moodle/Login.cs b/Assets/MirageXR/Player/Scripts/Moodle/Login.cs index aa61f5b2f..6cf90811c 100644 --- a/Assets/MirageXR/Player/Scripts/Moodle/Login.cs +++ b/Assets/MirageXR/Player/Scripts/Moodle/Login.cs @@ -115,7 +115,7 @@ private async Task UserLogin() } else { - AppLog.LogError($"User login failed. Error: {response}"); + Debug.LogError($"User login failed. Error: {response}"); status.color = Color.red; status.text = "Invalid login, please try again"; } @@ -133,7 +133,7 @@ private async void LoginSucceed(string token) DBManager.username = usernameField.text; welcomUserText.text = $"Welcome {DBManager.username}"; welcomUserText.gameObject.SetActive(true); - AppLog.LogInfo($"{DBManager.username} logged in successfully."); + Debug.LogInfo($"{DBManager.username} logged in successfully."); status.text = string.Empty; // close login menu ShowPanel(null); diff --git a/Assets/MirageXR/Player/Scripts/Moodle/MoodleManager.cs b/Assets/MirageXR/Player/Scripts/Moodle/MoodleManager.cs index 09484d93c..673b674fc 100644 --- a/Assets/MirageXR/Player/Scripts/Moodle/MoodleManager.cs +++ b/Assets/MirageXR/Player/Scripts/Moodle/MoodleManager.cs @@ -85,7 +85,7 @@ public async Task Login(string username, string password) if (!DBManager.LoggedIn) { - AppLog.LogError("You are not logged in"); + Debug.LogError("You are not logged in"); return (false, "Error: You are not logged in"); } @@ -106,11 +106,11 @@ public async Task Login(string username, string password) { if (response.EndsWith("Saved.")) { - AppLog.LogDebug(response); + Debug.LogDebug(response); } else { - AppLog.LogError(response); + Debug.LogError(response); } Maggie.Speak("The upload is completed."); @@ -125,12 +125,12 @@ public async Task Login(string username, string password) // The file handling response should be displayed as Log, not LogError if (response.Contains("File exist")) { - AppLog.LogError($"Error on uploading: {response}"); + Debug.LogError($"Error on uploading: {response}"); } else { Maggie.Speak("Uploading ARLEM failed. Check your system administrator."); - AppLog.LogError($"Error on uploading: {response}"); + Debug.LogError($"Error on uploading: {response}"); } if (_progressText) @@ -164,7 +164,7 @@ public async Task GetUserId() var (result, response) = await Network.GetCustomDataFromAPIRequestAsync(DBManager.token, DBManager.domain, requestValue, function, parametersValueFormat); if (!result) { - AppLog.LogError($"Can't get UserId, error: {response}"); + Debug.LogError($"Can't get UserId, error: {response}"); return null; } DBManager.userid = Regex.Replace(response, "[^0-9]+", string.Empty); // only numbers @@ -184,7 +184,7 @@ public async Task GetUserMail() var (result, response) = await Network.GetCustomDataFromAPIRequestAsync(DBManager.token, DBManager.domain, requestValue, function, parametersValueFormat); if (!result) { - AppLog.LogError($"Can't get Usermail, error: {response}"); + Debug.LogError($"Can't get Usermail, error: {response}"); return null; } @@ -214,7 +214,7 @@ public async Task> GetArlemList() } //Comented out the below debug log due to the size of the message - //AppLog.LogDebug(response); + //Debug.LogDebug(response); return ParseArlemListJson(response); } @@ -228,7 +228,7 @@ private static async Task GetArlemListJson(string serverUrl) if (!result || response.StartsWith("Error")) { - AppLog.LogError($"Network error\nmessage: {response}"); + Debug.LogError($"Network error\nmessage: {response}"); return null; } @@ -246,7 +246,7 @@ private static List ParseArlemListJson(string json) if (json == emptyJson) { - AppLog.LogWarning("Probably there is no public activity on the server."); + Debug.LogWarning("Probably there is no public activity on the server."); return arlemList; } @@ -264,7 +264,7 @@ private static List ParseArlemListJson(string json) } catch (Exception e) { - AppLog.LogError($"ParseArlemListJson error\nmessage: {e}"); + Debug.LogError($"ParseArlemListJson error\nmessage: {e}"); return null; } } @@ -282,11 +282,11 @@ public async Task DeleteArlem(string itemID, string sessionID) var value = result && !response.StartsWith("Error"); if (value) { - AppLog.LogInfo(sessionID + " is deleted from server"); + Debug.LogInfo(sessionID + " is deleted from server"); } else { - AppLog.LogError(response); + Debug.LogError(response); } return value; @@ -304,11 +304,11 @@ public async Task UpdateViewsOfActivity(string itemID) if (!result || response.StartsWith("Error")) { var maxLenght = 200; - AppLog.LogError(response.Length > maxLenght ? response.Substring(0, maxLenght) : response); + Debug.LogError(response.Length > maxLenght ? response.Substring(0, maxLenght) : response); } else { - AppLog.LogTrace(" Views column of the activity is increased"); + Debug.LogTrace(" Views column of the activity is increased"); } } @@ -336,7 +336,7 @@ private static async Task CompressRecord(string path, string recordingId } catch (Exception e) { - AppLog.LogError($"compression error: {e}"); + Debug.LogError($"compression error: {e}"); } return bytes; @@ -379,12 +379,12 @@ private static async Task CompressRecord(string path, string recordingId } else { - AppLog.LogError(error); + Debug.LogError(error); } } catch (Exception e) { - AppLog.LogException(e); + Debug.LogException(e); result = false; } finally diff --git a/Assets/MirageXR/Player/Scripts/RootObject.cs b/Assets/MirageXR/Player/Scripts/RootObject.cs index 532951ece..97f89819e 100644 --- a/Assets/MirageXR/Player/Scripts/RootObject.cs +++ b/Assets/MirageXR/Player/Scripts/RootObject.cs @@ -112,7 +112,7 @@ private async Task Initialization() // TODO: create base Manager class } catch (Exception e) { - AppLog.LogError(e.ToString()); + Debug.LogError(e.ToString()); } } diff --git a/Assets/MirageXR/Player/Scripts/Triggers/SmartTrigger.cs b/Assets/MirageXR/Player/Scripts/Triggers/SmartTrigger.cs index 57897df62..933721153 100644 --- a/Assets/MirageXR/Player/Scripts/Triggers/SmartTrigger.cs +++ b/Assets/MirageXR/Player/Scripts/Triggers/SmartTrigger.cs @@ -268,7 +268,7 @@ public bool CreateTrigger(string actionId, string sensorId, string keyId, string } catch (Exception e) { - AppLog.LogException(e); + Debug.LogException(e); return false; } } @@ -455,7 +455,7 @@ private void Update() } catch (Exception e) { - AppLog.LogException(e); + Debug.LogException(e); throw; } } diff --git a/Assets/MirageXR/Player/Scripts/Triggers/StepTrigger.cs b/Assets/MirageXR/Player/Scripts/Triggers/StepTrigger.cs index 652a86ca7..b857e9511 100644 --- a/Assets/MirageXR/Player/Scripts/Triggers/StepTrigger.cs +++ b/Assets/MirageXR/Player/Scripts/Triggers/StepTrigger.cs @@ -115,7 +115,7 @@ public void SetupTrigger() { if (!Enum.TryParse(triggerType, true, out ActionType type)) { - AppLog.LogWarning($"can't parse {triggerType} to ActionType"); + Debug.LogWarning($"can't parse {triggerType} to ActionType"); type = ActionType.Action; } activeAction.AddArlemTrigger(TriggerMode.Detect, type, MyPoi.poi, float.Parse(durationInputField.text), stepNumberInputField.text); diff --git a/Assets/MirageXR/Player/Scripts/Triggers/VoiceTrigger.cs b/Assets/MirageXR/Player/Scripts/Triggers/VoiceTrigger.cs index 2565eda7f..bcbd8c67a 100644 --- a/Assets/MirageXR/Player/Scripts/Triggers/VoiceTrigger.cs +++ b/Assets/MirageXR/Player/Scripts/Triggers/VoiceTrigger.cs @@ -46,7 +46,7 @@ public void AttachAction(string actionId) } catch (Exception e) { - AppLog.LogException(e); + Debug.LogException(e); throw; } } diff --git a/Assets/MirageXR/Player/Scripts/Tutorial/ArrowHighlightingTutorialStep.cs b/Assets/MirageXR/Player/Scripts/Tutorial/ArrowHighlightingTutorialStep.cs index 76b27166a..825f55d9f 100644 --- a/Assets/MirageXR/Player/Scripts/Tutorial/ArrowHighlightingTutorialStep.cs +++ b/Assets/MirageXR/Player/Scripts/Tutorial/ArrowHighlightingTutorialStep.cs @@ -66,7 +66,7 @@ protected void SetupArrow() } else { - AppLog.LogError("Highlighted object missing in tutorial step: " + this.GetType().Name); + Debug.LogError("Highlighted object missing in tutorial step: " + this.GetType().Name); manager.CloseTutorial(); } } diff --git a/Assets/MirageXR/Player/Scripts/Tutorial/HololensSteps/StepLockActivityMenu.cs b/Assets/MirageXR/Player/Scripts/Tutorial/HololensSteps/StepLockActivityMenu.cs index 31dd3e0e9..ec93b305f 100644 --- a/Assets/MirageXR/Player/Scripts/Tutorial/HololensSteps/StepLockActivityMenu.cs +++ b/Assets/MirageXR/Player/Scripts/Tutorial/HololensSteps/StepLockActivityMenu.cs @@ -31,7 +31,7 @@ private void LockClickListener() } catch { - AppLog.LogError("SpriteToggle component missing in Lock for StepLockActivityMenu in Tutorial."); + Debug.LogError("SpriteToggle component missing in Lock for StepLockActivityMenu in Tutorial."); ExitStep(); } diff --git a/Assets/MirageXR/Player/Scripts/Tutorial/HololensSteps/StepUnlockActivityMenu.cs b/Assets/MirageXR/Player/Scripts/Tutorial/HololensSteps/StepUnlockActivityMenu.cs index 500f6001d..8571f364b 100644 --- a/Assets/MirageXR/Player/Scripts/Tutorial/HololensSteps/StepUnlockActivityMenu.cs +++ b/Assets/MirageXR/Player/Scripts/Tutorial/HololensSteps/StepUnlockActivityMenu.cs @@ -32,7 +32,7 @@ private void UnlockClickListener() } catch { - AppLog.LogError("SpriteToggle component missing in Lock for StepUnlockActivityMenu in Tutorial."); + Debug.LogError("SpriteToggle component missing in Lock for StepUnlockActivityMenu in Tutorial."); ExitStep(); } diff --git a/Assets/MirageXR/Player/Scripts/Tutorial/TutorialButton.cs b/Assets/MirageXR/Player/Scripts/Tutorial/TutorialButton.cs index 5707ff531..627d38f2f 100644 --- a/Assets/MirageXR/Player/Scripts/Tutorial/TutorialButton.cs +++ b/Assets/MirageXR/Player/Scripts/Tutorial/TutorialButton.cs @@ -25,7 +25,7 @@ private void Awake() private void Start() { int tutorialStatus = PlayerPrefs.GetInt(TutorialManager.PLAYER_PREFS_STATUS_KEY); - AppLog.LogDebug(tutorialStatus.ToString()); + Debug.LogDebug(tutorialStatus.ToString()); if (tutorialStatus == TutorialManager.STATUS_LOAD_ON_START && PlatformManager.Instance.WorldSpaceUi) { // TODO: In the future, this should be changed to an event. Like: OnEverythingLoaded diff --git a/Assets/MirageXR/Player/Scripts/UI/SetBrandColor.cs b/Assets/MirageXR/Player/Scripts/UI/SetBrandColor.cs index a1799d867..1903419af 100644 --- a/Assets/MirageXR/Player/Scripts/UI/SetBrandColor.cs +++ b/Assets/MirageXR/Player/Scripts/UI/SetBrandColor.cs @@ -27,7 +27,7 @@ private void Awake() { if (brandManager == null) { - AppLog.LogWarning("BrandManager has been not initialized"); + Debug.LogWarning("BrandManager has been not initialized"); return; } diff --git a/Assets/MirageXR/Player/Scripts/UI/TaskStationDetailMenu.cs b/Assets/MirageXR/Player/Scripts/UI/TaskStationDetailMenu.cs index daf7c31e2..70e8a579b 100644 --- a/Assets/MirageXR/Player/Scripts/UI/TaskStationDetailMenu.cs +++ b/Assets/MirageXR/Player/Scripts/UI/TaskStationDetailMenu.cs @@ -85,7 +85,7 @@ private void SetupListeners() } catch { - AppLog.LogError("Augmentation Creation Button not found on Task Station Menu. Tutorial will not work."); + Debug.LogError("Augmentation Creation Button not found on Task Station Menu. Tutorial will not work."); } //Setup Title and Description Field listeners. Created for tutorial. @@ -103,7 +103,7 @@ private void SetupListeners() } catch { - AppLog.LogError("Action Title Input Field not found on Task Station Menu. Tutorial will not work."); + Debug.LogError("Action Title Input Field not found on Task Station Menu. Tutorial will not work."); } SetupActionDescriptionInputField(); @@ -127,7 +127,7 @@ private void SetupActionDescriptionInputField() } catch { - AppLog.LogError("Action Description Input Field not found on Task Station Menu. Tutorial will not work."); + Debug.LogError("Action Description Input Field not found on Task Station Menu. Tutorial will not work."); } } diff --git a/Assets/MirageXR/Player/Scripts/UI/TaskStep.cs b/Assets/MirageXR/Player/Scripts/UI/TaskStep.cs index 0b281aa9e..2d9cd7462 100644 --- a/Assets/MirageXR/Player/Scripts/UI/TaskStep.cs +++ b/Assets/MirageXR/Player/Scripts/UI/TaskStep.cs @@ -136,7 +136,7 @@ private void DoReset() _completedIcon.SetActive(false); _incompletedIcon.SetActive(true); _incompletedIcon.gameObject.GetComponent