Skip to content

Commit 3511256

Browse files
committed
array expanding layout behaviour fix
1 parent 52e6554 commit 3511256

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Assets/Editor/Editor Windows/ScriptableObjectEditorWindow.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ private void PutPropertiesForObject<T>(List<T> Configs) where T : ScriptableObje
121121
{
122122
// Show the name of each property as a label
123123
EditorGUILayout.LabelField(property.name, GUILayout.MinWidth(PropertyMinWidth));
124-
GUILayout.Space(PropertySpace);
124+
float height = EditorGUI.GetPropertyHeight(property, GUIContent.none) + PropertySpace;
125+
height -= EditorGUIUtility.singleLineHeight;
126+
GUILayout.Space(height);
125127
}
126128
ShouldNext = property.NextVisible(false); // Move to the next property, skipping nested children
127129
}

Assets/Resources/ScriptableObjects/Test2Config.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ MonoBehaviour:
1212
m_Script: {fileID: 11500000, guid: 2cac81c9ac410e441bde07e00491a572, type: 3}
1313
m_Name: Test2Config
1414
m_EditorClassIdentifier:
15-
numberArray: 3a0000002d000000
15+
numberArray: 2d0000003a000000
1616
gameObjectArray: []

0 commit comments

Comments
 (0)