Skip to content

Commit 8500c20

Browse files
committed
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.
1 parent 7c09708 commit 8500c20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/SubclassSelectorDrawer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public override void OnGUI (Rect position, SerializedProperty property, GUIConte
7171
Rect foldoutRect = new Rect(position);
7272
foldoutRect.height = EditorGUIUtility.singleLineHeight;
7373

74-
#if UNITY_2022_2_OR_NEWER && !UNITY_6000_0_OR_NEWER
74+
#if UNITY_2022_2_OR_NEWER && !UNITY_6000_0_OR_NEWER && !UNITY_2022_3
7575
// NOTE: Position x must be adjusted.
7676
// FIXME: Is there a more essential solution...?
7777
// 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
8585
foldoutRect.x -= 12;
8686
#endif
8787

88-
property.isExpanded = EditorGUI.Foldout(foldoutRect, property.isExpanded, GUIContent.none, true);
88+
property.isExpanded = EditorGUI.Foldout(foldoutRect, property.isExpanded, GUIContent.none, true);
8989
}
9090

9191
// Draw property if expanded.

0 commit comments

Comments
 (0)