From 31ff5311c2f5ab102b0b9bc6827de6b858b9c3e3 Mon Sep 17 00:00:00 2001 From: Shawn Kuang Date: Wed, 10 Nov 2021 18:41:28 -0800 Subject: [PATCH] Fixes #472: Remove the use of System.Diagnostics.Debug.Assert Direct use of `System.Diagnostics.Debug.Assert()` causes issue in production environment. Use Unity version of [Debug.Assert()](https://docs.unity3d.com/ScriptReference/Debug.Assert.html) instead. --- source/VersionHandlerImpl/src/VersionHandlerImpl.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/VersionHandlerImpl/src/VersionHandlerImpl.cs b/source/VersionHandlerImpl/src/VersionHandlerImpl.cs index c1010014..36e32fe2 100644 --- a/source/VersionHandlerImpl/src/VersionHandlerImpl.cs +++ b/source/VersionHandlerImpl/src/VersionHandlerImpl.cs @@ -991,7 +991,7 @@ public FileMetadataByVersion(string filenameCanonical) { /// Add metadata to the set. /// public void Add(FileMetadata metadata) { - System.Diagnostics.Debug.Assert( + Debug.Assert( filenameCanonical == null || metadata.filenameCanonical.Equals(filenameCanonical)); metadataByVersion[metadata.CalculateVersion()] = metadata; @@ -2311,7 +2311,7 @@ static void UpdateVersionedAssetsOnUpdate() { if (!Enabled) { return; } - + UpdateVersionedAssets(); NotifyWhenCompliationComplete(false); UpdateAssetsWithBuildTargets(EditorUserBuildSettings.activeBuildTarget);