Skip to content

Commit c850467

Browse files
committed
Fix foldout layout between Unity versions.
1 parent 44a84ce commit c850467

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,17 @@ public override void OnGUI (Rect position, SerializedProperty property, GUIConte
6969
Rect foldoutRect = new Rect(position);
7070
foldoutRect.height = EditorGUIUtility.singleLineHeight;
7171

72-
#if UNITY_2022_2
72+
#if UNITY_2022_2_OR_NEWER && !UNITY_6000_0_OR_NEWER
7373
// NOTE: Position x must be adjusted.
7474
// FIXME: Is there a more essential solution...?
75+
// The most promising is UI Toolkit, but it is currently unable to reproduce all of SubclassSelector features. (Complete provision of contextual menu, e.g.)
76+
// 2021.3: No adjustment
77+
// 2022.1: No adjustment
78+
// 2022.2: Adjustment required
79+
// 2022.3: Adjustment required
80+
// 2023.1: Adjustment required
81+
// 2023.2: Adjustment required
82+
// 6000.0: No adjustment
7583
foldoutRect.x -= 12;
7684
#endif
7785

0 commit comments

Comments
 (0)