Skip to content

Commit 804bf83

Browse files
committed
only show preset option if using unity 2018
1 parent ddad857 commit 804bf83

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Assets/FbxExporters/Editor/ExportModelEditorWindow.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ public abstract class ExportOptionsEditorWindow : EditorWindow
4141
protected float m_fbxExtLabelWidth;
4242

4343
protected virtual void OnEnable(){
44-
InitializeReceiver ();
44+
if (Application.unityVersion.Contains ("2018")) {
45+
InitializeReceiver ();
46+
}
4547
m_showOptions = true;
4648
this.minSize = new Vector2 (SelectableLabelMinWidth + LabelWidth + BrowseButtonWidth, MinWindowHeight);
4749

@@ -123,12 +125,14 @@ protected void OnGUI ()
123125
// Increasing the label width so that none of the text gets cut off
124126
EditorGUIUtility.labelWidth = LabelWidth;
125127

126-
GUILayout.BeginHorizontal ();
127-
GUILayout.FlexibleSpace ();
128-
if(EditorGUILayout.DropdownButton(presetIcon, FocusType.Keyboard, presetIconButton)){
129-
ShowPresetReceiver ();
128+
if (Application.unityVersion.Contains ("2018")) {
129+
GUILayout.BeginHorizontal ();
130+
GUILayout.FlexibleSpace ();
131+
if (EditorGUILayout.DropdownButton (presetIcon, FocusType.Keyboard, presetIconButton)) {
132+
ShowPresetReceiver ();
133+
}
134+
GUILayout.EndHorizontal ();
130135
}
131-
GUILayout.EndHorizontal();
132136

133137
EditorGUILayout.LabelField("Naming");
134138
EditorGUI.indentLevel++;

0 commit comments

Comments
 (0)