Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit ff4b1df

Browse files
authored
Merge pull request #223 from silentlamb1991/patch-1
Improve struct & class ParameterOverride editor GUI
2 parents 8288473 + 4f21e4d commit ff4b1df

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

PostProcessing/Editor/PostProcessEffectBaseEditor.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,17 @@ protected void PropertyField(SerializedParameterOverride property, GUIContent ti
148148
}
149149

150150
// Default unity field
151-
EditorGUILayout.PropertyField(property.value, title);
151+
if (property.value.hasVisibleChildren
152+
&& property.value.propertyType != SerializedPropertyType.Vector2
153+
&& property.value.propertyType != SerializedPropertyType.Vector3)
154+
{
155+
GUILayout.Space(12f);
156+
EditorGUILayout.PropertyField(property.value, title, true);
157+
}
158+
else
159+
{
160+
EditorGUILayout.PropertyField(property.value, title);
161+
}
152162
}
153163
}
154164
}

0 commit comments

Comments
 (0)