Skip to content

Commit f41ce4e

Browse files
author
AJubrey
committed
[ADDED] a check to see if MAYA_LOCATION is set, and then if it is we add it to the list
1 parent 851ef66 commit f41ce4e

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,23 +264,34 @@ private static string DefaultIntegrationSavePath {
264264
public static string[] DCCVendorLocations {
265265
get{
266266
var environmentVariable = Environment.GetEnvironmentVariable("UNITY_FBX_3DAPP_VENDOR_LOCATIONS");
267+
var mayaLocation = System.Environment.GetEnvironmentVariable("MAYA_LOCATION");
268+
List<string> locationsList = new List<string>();
269+
267270
if (environmentVariable != null)
268271
{
269-
string[] locations = environmentVariable.Split(';');
270-
List<string> locationsList = new List<string>();
272+
string[] locations = environmentVariable.Split(';');
271273
for (int i = 0; i < locations.Length; i++)
272274
{
273275
if (Directory.Exists(locations[i]))
274276
{
275277
locationsList.Add(locations[i]);
276278
}
277279
}
278-
if (locationsList.Count > 0)
280+
}
281+
282+
if (mayaLocation != null)
283+
{
284+
if (Directory.Exists(mayaLocation))
279285
{
280-
return locationsList.ToArray();
286+
locationsList.Add(mayaLocation);
281287
}
282288
}
283289

290+
if (locationsList.Count > 0)
291+
{
292+
return locationsList.ToArray();
293+
}
294+
284295
switch (Application.platform)
285296
{
286297
case RuntimePlatform.WindowsEditor:

0 commit comments

Comments
 (0)