File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,13 @@ public override void OnInspectorGUI() {
54
54
55
55
if ( GUILayout . Button ( "Browse" , EditorStyles . miniButton , GUILayout . Width ( BrowseButtonWidth ) ) ) {
56
56
string initialPath = ExportSettings . GetAbsoluteSavePath ( ) ;
57
+
58
+ // if the directory doesn't exist, set it to the default save path
59
+ // so we don't open somewhere unexpected
60
+ if ( ! System . IO . Directory . Exists ( initialPath ) ) {
61
+ initialPath = Application . dataPath ;
62
+ }
63
+
57
64
string fullPath = EditorUtility . OpenFolderPanel (
58
65
"Select Model Prefabs Path" , initialPath , null
59
66
) ;
@@ -99,7 +106,7 @@ public override void OnInspectorGUI() {
99
106
[ FilePath ( "ProjectSettings/FbxExportSettings.asset" , FilePathAttribute . Location . ProjectFolder ) ]
100
107
public class ExportSettings : ScriptableSingleton < ExportSettings >
101
108
{
102
- public const string kDefaultSavePath = "Objects " ;
109
+ public const string kDefaultSavePath = ". " ;
103
110
104
111
// Note: default values are set in LoadDefaults().
105
112
public bool weldVertices ;
You can’t perform that action at this time.
0 commit comments