You've already forked com.unity.ide.cursor
mirror of
https://github.com/boxqkrtm/com.unity.ide.cursor.git
synced 2026-05-14 14:20:09 +00:00
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 <OmarAlFarajat@users.noreply.github.com> 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>
This commit is contained in:
@@ -584,7 +584,12 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
|||||||
var application = Path;
|
var application = Path;
|
||||||
|
|
||||||
var workspace = TryFindWorkspace(directory);
|
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;
|
workspace ??= directory;
|
||||||
|
#else
|
||||||
|
workspace = workspace ?? directory;
|
||||||
|
#endif
|
||||||
directory = workspace;
|
directory = workspace;
|
||||||
|
|
||||||
if (EditorPrefs.GetBool(ReuseExistingWindowKey, false))
|
if (EditorPrefs.GetBool(ReuseExistingWindowKey, false))
|
||||||
|
|||||||
Reference in New Issue
Block a user