Skip to content

Commit 4755812

Browse files
committed
UNI-31556 make sure default integration save path doesn't have backslashes
- path can't have backslashes or else it will cause problems in Maya (backslashes removed, Maya can't find path to import settings)
1 parent b86504a commit 4755812

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ public class ExportSettings : ScriptableSingleton<ExportSettings>
255255
public const string kMayaLtOptionName = "MayaLT ";
256256
public const string kBlenderOptionName = "Blender ";
257257

258+
private static string DefaultIntegrationSavePath {
259+
get{
260+
return Path.GetDirectoryName(Application.dataPath);
261+
}
262+
}
263+
258264
/// <summary>
259265
/// The paths where all the different versions of Maya are installed
260266
/// by default. Depends on the platform.
@@ -328,7 +334,7 @@ protected override void LoadDefaults()
328334
launchAfterInstallation = true;
329335
ExportFormatSelection = 0;
330336
convertToModelSavePath = kDefaultSavePath;
331-
IntegrationSavePath = Directory.GetCurrentDirectory().ToString();
337+
IntegrationSavePath = DefaultIntegrationSavePath;
332338
dccOptionPaths = null;
333339
dccOptionNames = null;
334340
}
@@ -760,7 +766,7 @@ public static string GetIntegrationSavePath()
760766
if (string.IsNullOrEmpty(instance.IntegrationSavePath.Trim()) || !Directory.Exists(instance.IntegrationSavePath))
761767
{
762768
//The project folder, above the asset folder
763-
Directory.GetCurrentDirectory().ToString();
769+
instance.IntegrationSavePath = DefaultIntegrationSavePath;
764770
}
765771
return instance.IntegrationSavePath;
766772
}

0 commit comments

Comments
 (0)