1.11.4: Fixed issue, where MethodButton didn't work in Unity 6+

This commit is contained in:
Anders Ejlersen 2026-05-24 13:36:50 +02:00
parent df1d2f6df1
commit 6b63d05c6e
2 changed files with 10 additions and 3 deletions

View file

@ -66,15 +66,22 @@ namespace Module.Inspector.Editor
var position = new Rect(0, 0, 1, 1);
#if UNITY_2020_1_OR_NEWER && !UNITY_6000_1_OR_NEWER
if (Event.current.type == EventType.Repaint)
{
position = GUILayoutUtility.GetLastRect();
position.y -= totalHeight;
#if UNITY_2020_1_OR_NEWER
position.width = EditorGUIUtility.currentViewWidth - 22.0f;
#endif
}
#endif
#if UNITY_6000_1_OR_NEWER
position = GUILayoutUtility.GetLastRect();
position.y -= totalHeight;
position.width = EditorGUIUtility.currentViewWidth - 22.0f;
#endif
position.y = position.yMax + EditorGUIUtility.singleLineHeight;
position.height = EditorGUIUtility.singleLineHeight;

View file

@ -1,6 +1,6 @@
{
"name": "com.module.inspector",
"version": "1.11.3",
"version": "1.11.4",
"displayName": "Module.Inspector",
"description": "Custom inspector with various useful property drawers",
"unity": "2019.2",