Skip to content

Commit 968b3ee

Browse files
committed
feat: Use MyBox inspector lock
1 parent a0bbcae commit 968b3ee

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

Assets/JCSUnity/Editor/JCSUnity_Hotkeys.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,30 +46,6 @@ private static void SelectLockableInspector()
4646
}
4747
}
4848

49-
[MenuItem(MI_BaseName + "/Toggle Inspector Lock &w", false, MI_BasePriority + 50)]
50-
private static void ToggleInspectorLock()
51-
{
52-
if (_mouseOverWindow == null)
53-
{
54-
if (!EditorPrefs.HasKey("LockableInspectorIndex"))
55-
EditorPrefs.SetInt("LockableInspectorIndex", 0);
56-
int i = EditorPrefs.GetInt("LockableInspectorIndex");
57-
58-
Type type = Assembly.GetAssembly(typeof(Editor)).GetType("UnityEditor.InspectorWindow");
59-
Object[] findObjectsOfTypeAll = Resources.FindObjectsOfTypeAll(type);
60-
_mouseOverWindow = (EditorWindow)findObjectsOfTypeAll[i];
61-
}
62-
63-
if (_mouseOverWindow != null && _mouseOverWindow.GetType().Name == "InspectorWindow")
64-
{
65-
Type type = Assembly.GetAssembly(typeof(Editor)).GetType("UnityEditor.InspectorWindow");
66-
PropertyInfo propertyInfo = type.GetProperty("isLocked");
67-
bool value = (bool)propertyInfo.GetValue(_mouseOverWindow, null);
68-
propertyInfo.SetValue(_mouseOverWindow, !value, null);
69-
_mouseOverWindow.Repaint();
70-
}
71-
}
72-
7349
[MenuItem(MI_BaseName + "/Clear Console #&c", false, MI_BasePriority + 50)]
7450
private static void ClearConsole()
7551
{

0 commit comments

Comments
 (0)