@@ -88,37 +88,36 @@ internal static void Initialize()
8888
8989 private void DrawSettingsPanel ( )
9090 {
91- EditorGUILayout . LabelField ( "Settings" , EditorStyles . boldLabel ) ;
92-
9391 var rect = EditorGUILayout . GetControlRect ( true ) ;
92+ rect = EditorGUI . PrefixLabel ( rect , Style . typeContent ) ;
9493 typeField . OnGui ( rect , true , OnTypeSelected , data . InstanceType ) ;
9594 if ( data . InstanceType == null )
9695 {
9796 return ;
9897 }
9998
100- ToolboxEditorGui . DrawLine ( ) ;
101-
10299 EditorGUI . BeginChangeCheck ( ) ;
103100 data . InstanceName = EditorGUILayout . TextField ( Style . nameContent , data . InstanceName ) ;
104101 data . InstancesCount = EditorGUILayout . IntField ( Style . countContent , data . InstancesCount ) ;
105-
106- EditorGUI . BeginChangeCheck ( ) ;
107- var assignedInstance = EditorGUILayout . ObjectField ( Style . objectContent , data . BlueprintObject , data . InstanceType , false ) ;
108- data . BlueprintObject = assignedInstance ;
109- if ( EditorGUI . EndChangeCheck ( ) )
102+ using ( new EditorGUILayout . HorizontalScope ( ) )
110103 {
111- UpdateBlueprintObjectEditor ( ) ;
112- }
104+ EditorGUI . BeginChangeCheck ( ) ;
105+ var assignedInstance = EditorGUILayout . ObjectField ( Style . objectContent , data . BlueprintObject , data . InstanceType , false ) ;
106+ data . BlueprintObject = assignedInstance ;
107+ if ( EditorGUI . EndChangeCheck ( ) )
108+ {
109+ UpdateBlueprintObjectEditor ( ) ;
110+ }
113111
114- if ( assignedInstance != null )
115- {
116- inspectDefaultObject = GUILayout . Toggle ( inspectDefaultObject ,
117- Style . foldoutContent , Style . foldoutStyle , Style . foldoutOptions ) ;
118- }
119- else
120- {
121- inspectDefaultObject = false ;
112+ if ( assignedInstance != null )
113+ {
114+ inspectDefaultObject = GUILayout . Toggle ( inspectDefaultObject ,
115+ Style . foldoutContent , Style . foldoutStyle , Style . foldoutOptions ) ;
116+ }
117+ else
118+ {
119+ inspectDefaultObject = false ;
120+ }
122121 }
123122
124123 if ( inspectDefaultObject )
@@ -129,7 +128,6 @@ private void DrawSettingsPanel()
129128 }
130129 }
131130
132-
133131 if ( EditorGUI . EndChangeCheck ( ) )
134132 {
135133 OnWizardUpdate ( ) ;
@@ -237,7 +235,7 @@ protected override void OnWizardUpdate()
237235 protected override void OnWizardGui ( )
238236 {
239237 base . OnWizardGui ( ) ;
240- using ( new EditorGUILayout . VerticalScope ( Style . backgroundStyle ) )
238+ using ( new EditorGUILayout . VerticalScope ( ) )
241239 {
242240 DrawSettingsPanel ( ) ;
243241 }
@@ -250,6 +248,7 @@ private static class Style
250248 internal static readonly GUIStyle backgroundStyle ;
251249 internal static readonly GUIStyle foldoutStyle ;
252250
251+ internal static readonly GUIContent typeContent = new GUIContent ( "Instance Type" ) ;
253252 internal static readonly GUIContent nameContent = new GUIContent ( "Instance Name" ) ;
254253 internal static readonly GUIContent countContent = new GUIContent ( "Instances Count" , "Indicates how many instances will be created." ) ;
255254 internal static readonly GUIContent objectContent = new GUIContent ( "Blueprint Object" , "Will be used as a blueprint for all created ScriptableObjects." ) ;
0 commit comments