From 3d37c8d9d80ffe80477f9604795d027295e79208 Mon Sep 17 00:00:00 2001 From: Merlin <36685500+Merlin-san@users.noreply.github.com> Date: Mon, 13 Jul 2020 11:55:30 -0700 Subject: [PATCH] Skip initialization of file watcher for exception watcher when it's disabled - Addresses #50 --- .../UdonSharp/Editor/UdonSharpRuntimeExceptionWatcher.cs | 7 +++++-- Assets/UdonSharp/version.txt | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Assets/UdonSharp/Editor/UdonSharpRuntimeExceptionWatcher.cs b/Assets/UdonSharp/Editor/UdonSharpRuntimeExceptionWatcher.cs index a16cad8a..c0e0270d 100644 --- a/Assets/UdonSharp/Editor/UdonSharpRuntimeExceptionWatcher.cs +++ b/Assets/UdonSharp/Editor/UdonSharpRuntimeExceptionWatcher.cs @@ -35,11 +35,14 @@ static bool InitializeScriptLookup() if (EditorApplication.isCompiling || EditorApplication.isUpdating) return false; - - AssemblyReloadEvents.beforeAssemblyReload += CleanupLogWatcher; UdonSharpSettings udonSharpSettings = UdonSharpSettings.GetSettings(); + if (udonSharpSettings == null || !udonSharpSettings.listenForVRCExceptions) + return false; + + AssemblyReloadEvents.beforeAssemblyReload += CleanupLogWatcher; + if (logDirectoryWatcher == null) { // Now setup the filesystem watcher diff --git a/Assets/UdonSharp/version.txt b/Assets/UdonSharp/version.txt index 0ffcf198..4b7d50c9 100644 --- a/Assets/UdonSharp/version.txt +++ b/Assets/UdonSharp/version.txt @@ -1 +1 @@ -v0.17.1 +v0.17.2