You've already forked com.unity.ide.cursor
mirror of
https://github.com/boxqkrtm/com.unity.ide.cursor.git
synced 2026-05-15 23:10:06 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user