From d17d7814f6354a3b948ee541e044b1f80b1dc731 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Feb 2026 19:53:35 +0900 Subject: [PATCH] Fix CS1525: Use C# 7.3-compatible null-coalescing for Unity 2019.4 (#37) * Initial plan * Fix CS1525 compiler error for Unity 2019.4 by replacing ??= with version-compatible code Co-authored-by: boxqkrtm <8157743+boxqkrtm@users.noreply.github.com> * Add clarifying comment for Unity 2019.4 C# 7.3 compatibility Co-authored-by: OmarAlFarajat Co-authored-by: boxqkrtm <8157743+boxqkrtm@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: boxqkrtm <8157743+boxqkrtm@users.noreply.github.com> --- Editor/VisualStudioCursorInstallation.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Editor/VisualStudioCursorInstallation.cs b/Editor/VisualStudioCursorInstallation.cs index e27f87c..07234a2 100644 --- a/Editor/VisualStudioCursorInstallation.cs +++ b/Editor/VisualStudioCursorInstallation.cs @@ -584,7 +584,12 @@ namespace Microsoft.Unity.VisualStudio.Editor var application = Path; var workspace = TryFindWorkspace(directory); + // Use version-compatible null-coalescing for Unity 2019.4 (C# 7.3) support +#if UNITY_2020_2_OR_NEWER workspace ??= directory; +#else + workspace = workspace ?? directory; +#endif directory = workspace; if (EditorPrefs.GetBool(ReuseExistingWindowKey, false))