From 8500c20f780b304630eeeebe41dc88f73c2d72f1 Mon Sep 17 00:00:00 2001 From: Makihiro Date: Sun, 18 Jan 2026 22:07:51 +0900 Subject: [PATCH] Update foldout rect adjustment preprocessor conditions Modified the preprocessor directive to exclude UNITY_2022_3 from the foldout rect adjustment logic. This ensures compatibility with Unity 2022.3 and newer versions where the adjustment is not needed. --- .../Editor/SubclassSelectorDrawer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/SubclassSelectorDrawer.cs b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/SubclassSelectorDrawer.cs index 157725c..2bc890d 100644 --- a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/SubclassSelectorDrawer.cs +++ b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/SubclassSelectorDrawer.cs @@ -71,7 +71,7 @@ public override void OnGUI (Rect position, SerializedProperty property, GUIConte Rect foldoutRect = new Rect(position); foldoutRect.height = EditorGUIUtility.singleLineHeight; -#if UNITY_2022_2_OR_NEWER && !UNITY_6000_0_OR_NEWER +#if UNITY_2022_2_OR_NEWER && !UNITY_6000_0_OR_NEWER && !UNITY_2022_3 // NOTE: Position x must be adjusted. // FIXME: Is there a more essential solution...? // The most promising is UI Toolkit, but it is currently unable to reproduce all of SubclassSelector features. (Complete provision of contextual menu, e.g.) @@ -85,7 +85,7 @@ public override void OnGUI (Rect position, SerializedProperty property, GUIConte foldoutRect.x -= 12; #endif - property.isExpanded = EditorGUI.Foldout(foldoutRect, property.isExpanded, GUIContent.none, true); + property.isExpanded = EditorGUI.Foldout(foldoutRect, property.isExpanded, GUIContent.none, true); } // Draw property if expanded.