Skip to content

Commit e3a1803

Browse files
committed
Removed preset so we can launch in Unity 2017
1 parent e366f21 commit e3a1803

File tree

4 files changed

+0
-98
lines changed

4 files changed

+0
-98
lines changed

Assets/FbxExporters/Editor/ConvertToPrefabEditorWindow.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using UnityEngine;
44
using UnityEditor;
55
using FbxExporters.EditorTools;
6-
using UnityEditor.Presets;
76
using System.Linq;
87

98
namespace FbxExporters
@@ -85,11 +84,6 @@ protected override bool DisableNameSelection ()
8584
return m_toConvert.Length > 1;
8685
}
8786

88-
protected override void ShowPresetReceiver ()
89-
{
90-
ShowPresetReceiver (ExportSettings.instance.convertToPrefabSettings);
91-
}
92-
9387
protected override void CreateCustomUI ()
9488
{
9589
GUILayout.BeginHorizontal ();

Assets/FbxExporters/Editor/ExportModelEditorWindow.cs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using UnityEngine;
44
using UnityEditor;
55
using FbxExporters.EditorTools;
6-
using UnityEditor.Presets;
76
using System.Linq;
87

98
namespace FbxExporters
@@ -29,10 +28,6 @@ public abstract class ExportOptionsEditorWindow : EditorWindow
2928
protected string m_exportFileName = "";
3029

3130
protected UnityEditor.Editor m_innerEditor;
32-
protected FbxExportPresetSelectorReceiver m_receiver;
33-
34-
private static GUIContent presetIcon { get { return EditorGUIUtility.IconContent ("Preset.Context"); }}
35-
private static GUIStyle presetIconButton { get { return new GUIStyle("IconButton"); }}
3631

3732
private bool m_showOptions;
3833

@@ -41,7 +36,6 @@ public abstract class ExportOptionsEditorWindow : EditorWindow
4136
protected float m_fbxExtLabelWidth;
4237

4338
protected virtual void OnEnable(){
44-
InitializeReceiver ();
4539
m_showOptions = true;
4640
this.minSize = new Vector2 (SelectableLabelMinWidth + LabelWidth + BrowseButtonWidth, MinWindowHeight);
4741

@@ -66,16 +60,6 @@ protected virtual void InitializeWindow(string filename = ""){
6660
this.SetFilename (filename);
6761
}
6862

69-
protected void InitializeReceiver(){
70-
if (!m_receiver) {
71-
m_receiver = ScriptableObject.CreateInstance<FbxExportPresetSelectorReceiver> () as FbxExportPresetSelectorReceiver;
72-
m_receiver.SelectionChanged -= OnPresetSelectionChanged;
73-
m_receiver.SelectionChanged += OnPresetSelectionChanged;
74-
m_receiver.DialogClosed -= SaveExportSettings;
75-
m_receiver.DialogClosed += SaveExportSettings;
76-
}
77-
}
78-
7963
public void SetFilename(string filename){
8064
// remove .fbx from end of filename
8165
int extIndex = filename.LastIndexOf(".fbx");
@@ -109,25 +93,13 @@ protected virtual bool DisableNameSelection(){
10993
return false;
11094
}
11195

112-
protected abstract void ShowPresetReceiver ();
113-
114-
protected void ShowPresetReceiver(UnityEngine.Object target){
115-
InitializeReceiver ();
116-
m_receiver.SetTarget(target);
117-
m_receiver.SetInitialValue (new Preset (target));
118-
UnityEditor.Presets.PresetSelector.ShowSelector(target, null, true, m_receiver);
119-
}
120-
12196
protected void OnGUI ()
12297
{
12398
// Increasing the label width so that none of the text gets cut off
12499
EditorGUIUtility.labelWidth = LabelWidth;
125100

126101
GUILayout.BeginHorizontal ();
127102
GUILayout.FlexibleSpace ();
128-
if(EditorGUILayout.DropdownButton(presetIcon, FocusType.Keyboard, presetIconButton)){
129-
ShowPresetReceiver ();
130-
}
131103
GUILayout.EndHorizontal();
132104

133105
EditorGUILayout.LabelField("Naming");
@@ -362,11 +334,6 @@ protected override void Export(){
362334
AssetDatabase.Refresh ();
363335
}
364336
}
365-
366-
protected override void ShowPresetReceiver ()
367-
{
368-
ShowPresetReceiver (ExportSettings.instance.exportModelSettings);
369-
}
370337
}
371338
}
372339
}

Assets/FbxExporters/Editor/FbxExportPresetSelectorReceiver.cs

Lines changed: 0 additions & 48 deletions
This file was deleted.

Assets/FbxExporters/Editor/FbxExportPresetSelectorReceiver.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)