@@ -259,6 +259,8 @@ public static string[] DCCVendorLocations {
259
259
get {
260
260
var environmentVariable = Environment . GetEnvironmentVariable ( "UNITY_FBX_3DAPP_VENDOR_LOCATIONS" ) ;
261
261
List < string > locationsList = new List < string > ( ) ;
262
+ List < string > WindowsDefaultLocations = new List < string > ( ) { "C:/Program Files/Autodesk" , "D:/Program Files/Autodesk" } ;
263
+ List < string > OSXDefaultLocations = new List < string > ( ) { "/Applications/Autodesk" } ;
262
264
263
265
if ( environmentVariable != null )
264
266
{
@@ -285,6 +287,15 @@ public static string[] DCCVendorLocations {
285
287
if ( Directory . GetParent ( location ) != null )
286
288
{
287
289
possibleLocation = Directory . GetParent ( location ) . ToString ( ) ;
290
+
291
+ //Make sure the user defined path is not included in the default paths
292
+ for ( int i = 0 ; i < WindowsDefaultLocations . Count ; i ++ )
293
+ {
294
+ if ( WindowsDefaultLocations [ i ] . Equals ( possibleLocation ) )
295
+ {
296
+ possibleLocation = null ;
297
+ }
298
+ }
288
299
}
289
300
290
301
if ( Application . platform == RuntimePlatform . OSXEditor )
@@ -301,6 +312,15 @@ public static string[] DCCVendorLocations {
301
312
if ( autoDeskFolder != null )
302
313
{
303
314
possibleLocation = autoDeskFolder . ToString ( ) ;
315
+
316
+ //Make sure the user defined path is not included in the default paths
317
+ for ( int i = 0 ; i < OSXDefaultLocations . Count ; i ++ )
318
+ {
319
+ if ( OSXDefaultLocations [ i ] . Equals ( possibleLocation ) )
320
+ {
321
+ possibleLocation = null ;
322
+ }
323
+ }
304
324
}
305
325
}
306
326
}
@@ -315,10 +335,10 @@ public static string[] DCCVendorLocations {
315
335
switch ( Application . platform )
316
336
{
317
337
case RuntimePlatform . WindowsEditor :
318
- locationsList . AddRange ( new string [ ] { "C:/Program Files/Autodesk" , "D:/Program Files/Autodesk" } ) ;
338
+ locationsList . AddRange ( WindowsDefaultLocations ) ;
319
339
break ;
320
340
case RuntimePlatform . OSXEditor :
321
- locationsList . AddRange ( new string [ ] { "/Applications/Autodesk" } ) ;
341
+ locationsList . AddRange ( OSXDefaultLocations ) ;
322
342
break ;
323
343
default :
324
344
throw new NotImplementedException ( ) ;
0 commit comments