Skip to content

Commit 03e617b

Browse files
author
Benoit Hudson
committed
UNI-22052: fix warning on cancel choosing prefab path
1 parent e4b8f87 commit 03e617b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@ public override void OnInspectorGUI() {
5252
string path = EditorUtility.OpenFolderPanel (
5353
"Select Model Prefabs Path", Application.dataPath, null
5454
);
55-
// Make sure something is selected, and that it is in the Asset folder
56-
if (!string.IsNullOrEmpty (path) && path.StartsWith (Application.dataPath)) {
57-
exportSettings.convertToModelSavePath = path;
58-
} else {
59-
Debug.LogWarning ("Please select a location in Assets/");
55+
// Unless the user canceled, make sure they chose something in the Assets folder.
56+
if (!string.IsNullOrEmpty (path)) {
57+
if(path.StartsWith (Application.dataPath)) {
58+
exportSettings.convertToModelSavePath = path;
59+
} else {
60+
Debug.LogWarning ("Please select a location in Assets/");
61+
}
6062
}
6163
}
6264

0 commit comments

Comments
 (0)