From bf8da7e0d254eeb45e4dc96aca31041c52c5d99a Mon Sep 17 00:00:00 2001 From: Benjamin Hallion Date: Wed, 28 Dec 2022 12:08:04 +0100 Subject: [PATCH] Avoid unnecessary computation of manifest each time the play mode is started in editor --- source/VersionHandlerImpl/src/VersionHandlerImpl.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/VersionHandlerImpl/src/VersionHandlerImpl.cs b/source/VersionHandlerImpl/src/VersionHandlerImpl.cs index 36e32fe2..a0f303e7 100644 --- a/source/VersionHandlerImpl/src/VersionHandlerImpl.cs +++ b/source/VersionHandlerImpl/src/VersionHandlerImpl.cs @@ -2299,11 +2299,14 @@ private static void LoadLogPreferences() { /// and remove files from older manifest files. /// static VersionHandlerImpl() { - Log("Loaded VersionHandlerImpl", verbose: true); - RunOnMainThread.Run(() => { - LoadLogPreferences(); - UpdateVersionedAssetsOnUpdate(); - }, runNow: false); + if (!EditorApplication.isPlayingOrWillChangePlaymode) + { + Log("Loaded VersionHandlerImpl", verbose: true); + RunOnMainThread.Run(() => { + LoadLogPreferences(); + UpdateVersionedAssetsOnUpdate(); + }, runNow: false); + } } static void UpdateVersionedAssetsOnUpdate() {