@@ -267,6 +267,24 @@ public void TestGetDCCOptions()
267
267
[ Test ]
268
268
public void FindDCCInstallsTest1 ( )
269
269
{
270
+
271
+ /*
272
+ * different directory roots denoted by ' (eg.) (maya 2017 in rootDir1) = a (maya 2017 in rootDir2) = a'
273
+ * a (maya2017)
274
+ * b (maya2018)
275
+ * c (mayaLT2017)
276
+ * d (mayaLT2018)
277
+ * e (3dsmax2017)
278
+ * f (3dsmax2018)
279
+ */
280
+
281
+ // case 1.1: VI=a ML=b', result=2
282
+ // case 1.2: VL=a ML=d' result=2
283
+ // case 1.3: VL=c ML=b' result=2
284
+ // case 1.4: VL=c ML=d' result=2
285
+ // case 1.5: VL=e ML=b' result=2
286
+ // case 1.6: VL=e ML=d' result=2
287
+
270
288
string rootDir1 = GetRandomFileNamePath ( extName : "" ) ;
271
289
string rootDir2 = GetRandomFileNamePath ( extName : "" ) ;
272
290
@@ -327,7 +345,7 @@ public void FindDCCInstallsTest1()
327
345
328
346
//SetUp
329
347
//make the hierarchy for the single app path we need
330
- CreateDummyInstalls ( vendorInstallFolders ) ;
348
+ VendorLocations_Setup ( vendorInstallFolders ) ;
331
349
332
350
TestLocations ( envVendorLocations , envMayaLocation , expectedResult ) ;
333
351
@@ -354,8 +372,7 @@ public void TestLocations(string vendorLocation, string mayaLocation, int expect
354
372
SetEnvironmentVariables ( vendorLocation , mayaLocation ) ;
355
373
356
374
//Nullify these lists so that we guarantee that FindDccInstalls will be called.
357
- ExportSettings . instance . SetDCCOptionNames ( null ) ;
358
- ExportSettings . instance . SetDCCOptionPaths ( null ) ;
375
+ ExportSettings . instance . ClearDCCOptions ( ) ;
359
376
360
377
GUIContent [ ] options = ExportSettings . GetDCCOptions ( ) ;
361
378
@@ -382,7 +399,7 @@ public void TestLocations(string vendorLocation, string mayaLocation, int expect
382
399
/// <param name="mayaLocationPath"></param>
383
400
public void SetEnvironmentVariables ( string vendorLocation , string mayaLocationPath )
384
401
{
385
- if ( vendorLocation != null )
402
+ if ( ! string . IsNullOrEmpty ( vendorLocation ) )
386
403
{
387
404
//if the given vendor location isn't null, set the environment variable to it.
388
405
System . Environment . SetEnvironmentVariable ( "UNITY_FBX_3DAPP_VENDOR_LOCATIONS" , vendorLocation ) ;
@@ -394,7 +411,7 @@ public void SetEnvironmentVariables(string vendorLocation, string mayaLocationPa
394
411
}
395
412
}
396
413
397
- public void CreateDummyInstalls ( List < string > paths )
414
+ public void VendorLocations_Setup ( List < string > paths )
398
415
{
399
416
foreach ( var pathToExe in paths )
400
417
{
0 commit comments