@@ -88,37 +88,36 @@ internal static void Initialize()
88
88
89
89
private void DrawSettingsPanel ( )
90
90
{
91
- EditorGUILayout . LabelField ( "Settings" , EditorStyles . boldLabel ) ;
92
-
93
91
var rect = EditorGUILayout . GetControlRect ( true ) ;
92
+ rect = EditorGUI . PrefixLabel ( rect , Style . typeContent ) ;
94
93
typeField . OnGui ( rect , true , OnTypeSelected , data . InstanceType ) ;
95
94
if ( data . InstanceType == null )
96
95
{
97
96
return ;
98
97
}
99
98
100
- ToolboxEditorGui . DrawLine ( ) ;
101
-
102
99
EditorGUI . BeginChangeCheck ( ) ;
103
100
data . InstanceName = EditorGUILayout . TextField ( Style . nameContent , data . InstanceName ) ;
104
101
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 ( ) )
110
103
{
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
+ }
113
111
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
+ }
122
121
}
123
122
124
123
if ( inspectDefaultObject )
@@ -129,7 +128,6 @@ private void DrawSettingsPanel()
129
128
}
130
129
}
131
130
132
-
133
131
if ( EditorGUI . EndChangeCheck ( ) )
134
132
{
135
133
OnWizardUpdate ( ) ;
@@ -237,7 +235,7 @@ protected override void OnWizardUpdate()
237
235
protected override void OnWizardGui ( )
238
236
{
239
237
base . OnWizardGui ( ) ;
240
- using ( new EditorGUILayout . VerticalScope ( Style . backgroundStyle ) )
238
+ using ( new EditorGUILayout . VerticalScope ( ) )
241
239
{
242
240
DrawSettingsPanel ( ) ;
243
241
}
@@ -250,6 +248,7 @@ private static class Style
250
248
internal static readonly GUIStyle backgroundStyle ;
251
249
internal static readonly GUIStyle foldoutStyle ;
252
250
251
+ internal static readonly GUIContent typeContent = new GUIContent ( "Instance Type" ) ;
253
252
internal static readonly GUIContent nameContent = new GUIContent ( "Instance Name" ) ;
254
253
internal static readonly GUIContent countContent = new GUIContent ( "Instances Count" , "Indicates how many instances will be created." ) ;
255
254
internal static readonly GUIContent objectContent = new GUIContent ( "Blueprint Object" , "Will be used as a blueprint for all created ScriptableObjects." ) ;
0 commit comments