File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -379,6 +379,11 @@ public void SetDCCOptionNames(List<string> newList)
379
379
dccOptionNames = newList ;
380
380
}
381
381
382
+ public void SetDCCOptionPaths ( List < string > newList )
383
+ {
384
+ dccOptionPaths = newList ;
385
+ }
386
+
382
387
public void ClearDCCOptionNames ( )
383
388
{
384
389
dccOptionNames . Clear ( ) ;
Original file line number Diff line number Diff line change @@ -217,22 +217,26 @@ public void TestFindPreferredProgram()
217
217
public void TestGetDCCOptions ( )
218
218
{
219
219
string projectPath = Application . dataPath ;
220
- Debug . Log ( projectPath ) ;
221
220
var firstPath = Directory . CreateDirectory ( projectPath + "/GetDCCOptionsTestFolder/3ds max 3000" ) ;
222
221
var secondPath = Directory . CreateDirectory ( projectPath + "/GetDCCOptionsTestFolder/3ds max 3001" ) ;
223
- FileInfo firstExe = new FileInfo ( projectPath + "/GetDCCOptionsTestFolder/3ds max 3000/3dsmax.exe" ) ;
224
- firstExe . Create ( ) ;
225
- firstExe . Open ( FileMode . Open ) ;
226
-
222
+ FileInfo firstExe = new FileInfo ( projectPath + "/GetDCCOptionsTestFolder/3ds max 3000/3dsmax.exe" ) ;
223
+ using ( FileStream s = firstExe . Create ( ) ) { }
227
224
228
225
List < string > testPathList = new List < string > ( ) ;
229
226
testPathList . Add ( projectPath + "/GetDCCOptionsTestFolder/3ds max 3001" ) ; //bogus path which should be removed
230
227
testPathList . Add ( projectPath + "/GetDCCOptionsTestFolder/3ds max 3000" ) ;
231
- testPathList . Add ( "C:/Program Files/Autodesk/3ds Max 2018/3dsmax.exe" ) ;
232
228
233
- firstExe . Delete ( ) ;
234
- firstPath . Delete ( ) ;
235
- secondPath . Delete ( ) ;
229
+ List < string > testNameList = new List < string > ( ) ;
230
+ testNameList . Add ( "3ds max 3001" ) ;
231
+
232
+ ExportSettings . instance . SetDCCOptionNames ( testNameList ) ;
233
+ ExportSettings . instance . SetDCCOptionPaths ( testPathList ) ;
234
+
235
+ GUIContent [ ] options = ExportSettings . GetDCCOptions ( ) ;
236
+ Debug . Log ( options . Length ) ;
237
+
238
+ firstPath . Delete ( true ) ;
239
+ secondPath . Delete ( true ) ;
236
240
}
237
241
238
242
}
You can’t perform that action at this time.
0 commit comments