@@ -27,7 +27,7 @@ public abstract class ExportOptionsEditorWindow : EditorWindow
27
27
protected bool m_singleHierarchyExport = true ;
28
28
29
29
protected UnityEditor . Editor m_innerEditor ;
30
- private FbxExportPresetSelectorReceiver m_receiver ;
30
+ protected FbxExportPresetSelectorReceiver m_receiver ;
31
31
32
32
private static GUIContent presetIcon { get { return EditorGUIUtility . IconContent ( "Preset.Context" ) ; } }
33
33
private static GUIStyle presetIconButton { get { return new GUIStyle ( "IconButton" ) ; } }
@@ -70,7 +70,7 @@ private void SetTitle(){
70
70
this . titleContent = m_windowTitle ;
71
71
}
72
72
73
- private void InitializeReceiver ( ) {
73
+ protected void InitializeReceiver ( ) {
74
74
if ( ! m_receiver ) {
75
75
m_receiver = ScriptableObject . CreateInstance < FbxExportPresetSelectorReceiver > ( ) as FbxExportPresetSelectorReceiver ;
76
76
m_receiver . SelectionChanged -= OnPresetSelectionChanged ;
@@ -128,6 +128,8 @@ protected virtual bool DisableNameSelection(){
128
128
return false ;
129
129
}
130
130
131
+ protected abstract void ShowPresetReceiver ( ) ;
132
+
131
133
protected void OnGUI ( )
132
134
{
133
135
// Increasing the label width so that none of the text gets cut off
@@ -136,10 +138,7 @@ protected void OnGUI ()
136
138
GUILayout . BeginHorizontal ( ) ;
137
139
GUILayout . FlexibleSpace ( ) ;
138
140
if ( EditorGUILayout . DropdownButton ( presetIcon , FocusType . Keyboard , presetIconButton ) ) {
139
- InitializeReceiver ( ) ;
140
- m_receiver . SetTarget ( ExportSettings . instance . exportModelSettings ) ;
141
- m_receiver . SetInitialValue ( new Preset ( ExportSettings . instance . exportModelSettings ) ) ;
142
- UnityEditor . Presets . PresetSelector . ShowSelector ( ExportSettings . instance . exportModelSettings , null , true , m_receiver ) ;
141
+ ShowPresetReceiver ( ) ;
143
142
}
144
143
GUILayout . EndHorizontal ( ) ;
145
144
@@ -299,6 +298,14 @@ protected override void Export(){
299
298
AssetDatabase . Refresh ( ) ;
300
299
}
301
300
}
301
+
302
+ protected override void ShowPresetReceiver ( )
303
+ {
304
+ InitializeReceiver ( ) ;
305
+ m_receiver . SetTarget ( ExportSettings . instance . exportModelSettings ) ;
306
+ m_receiver . SetInitialValue ( new Preset ( ExportSettings . instance . exportModelSettings ) ) ;
307
+ UnityEditor . Presets . PresetSelector . ShowSelector ( ExportSettings . instance . exportModelSettings , null , true , m_receiver ) ;
308
+ }
302
309
}
303
310
}
304
311
}
0 commit comments