Skip to content

Commit 1504d5e

Browse files
committed
use get/set for integration folder path
1 parent f978340 commit 1504d5e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Assets/FbxExporters/Editor/InstallIntegration.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,23 @@ class Integrations
1616

1717
private const string FBX_EXPORT_SETTINGS_PATH = "Integrations/Autodesk/maya/scripts/unityFbxExportSettings.mel";
1818

19-
public static string INTEGRATION_FOLDER_PATH = Application.dataPath;
19+
private static string m_integrationFolderPath = null;
20+
public static string INTEGRATION_FOLDER_PATH
21+
{
22+
get{
23+
if (string.IsNullOrEmpty (m_integrationFolderPath)) {
24+
m_integrationFolderPath = Application.dataPath;
25+
}
26+
return m_integrationFolderPath;
27+
}
28+
set{
29+
if (!string.IsNullOrEmpty (value) && System.IO.Directory.Exists (value)) {
30+
m_integrationFolderPath = value;
31+
} else {
32+
Debug.LogError (string.Format("Failed to set integration folder path, invalid directory \"{0}\"", value));
33+
}
34+
}
35+
}
2036

2137
public class MayaException : System.Exception {
2238
public MayaException() { }

0 commit comments

Comments
 (0)