Skip to content

Commit 43b151a

Browse files
author
Benoit Hudson
committed
UNI-22052: fix browse dialog should open to the setting
1 parent 03e617b commit 43b151a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,15 @@ public override void OnInspectorGUI() {
4949
EditorStyles.textField, GUILayout.MinWidth(SelectableLabelMinWidth), GUILayout.Height(EditorGUIUtility.singleLineHeight));
5050

5151
if (GUILayout.Button ("Browse", EditorStyles.miniButton, GUILayout.Width (BrowseButtonWidth))) {
52+
string initialPath = exportSettings.convertToModelSavePath;
53+
bool initialPathIsValid = true;
54+
if (string.IsNullOrEmpty(initialPath)) {
55+
initialPathIsValid = false;
56+
}
5257
string path = EditorUtility.OpenFolderPanel (
53-
"Select Model Prefabs Path", Application.dataPath, null
58+
"Select Model Prefabs Path", initialPathIsValid ? initialPath : Application.dataPath, null
5459
);
60+
5561
// Unless the user canceled, make sure they chose something in the Assets folder.
5662
if (!string.IsNullOrEmpty (path)) {
5763
if(path.StartsWith (Application.dataPath)) {

0 commit comments

Comments
 (0)