com.unity.ide.visualstudio@2.0.16

## [2.0.16] - 2022-06-08

Integration:

- Prevent ADB Refresh while being in safe-mode with a URP project
- Fixed an issue keeping the progress bar visible even after opening a script with Visual Studio.
This commit is contained in:
Unity Technologies
2022-06-08 00:00:00 +00:00
parent b132c03a8a
commit 7c58d4170b
17 changed files with 49 additions and 111 deletions

View File

@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
using System;
using UnityEditor;
using UnityEditor.Compilation;
namespace Microsoft.Unity.VisualStudio.Editor
@@ -37,6 +38,17 @@ namespace Microsoft.Unity.VisualStudio.Editor
}
}
private static readonly Lazy<bool> _lazyIsInSafeMode = new Lazy<bool>(() =>
{
// internal static extern bool isInSafeMode { get {} }
var ieu = typeof(EditorUtility);
var pinfo = ieu.GetProperty("isInSafeMode", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic);
if (pinfo == null)
return false;
return Convert.ToBoolean(pinfo.GetValue(null));
});
public static bool IsInSafeMode => _lazyIsInSafeMode.Value;
public static Version LatestLanguageVersionSupported(Assembly assembly)
{
#if UNITY_2020_2_OR_NEWER