File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -393,19 +393,23 @@ public static GUIContent[] GetDCCOptions(){
393
393
}
394
394
395
395
// remove options that no longer exist
396
- List < int > toDelete = new List < int > ( ) ;
396
+ List < string > pathsToDelete = new List < string > ( ) ;
397
+ List < string > namesToDelete = new List < string > ( ) ;
397
398
for ( int i = 0 ; i < instance . dccOptionPaths . Count ; i ++ ) {
398
399
var dccPath = instance . dccOptionPaths [ i ] ;
399
400
if ( ! File . Exists ( dccPath ) ) {
400
401
if ( i == instance . selectedDCCApp ) {
401
402
instance . selectedDCCApp = 0 ;
402
403
}
403
- instance . dccOptionNames . RemoveAt ( i ) ;
404
- toDelete . Add ( i ) ;
404
+ namesToDelete . Add ( instance . dccOptionNames [ i ] ) ;
405
+ pathsToDelete . Add ( dccPath ) ;
405
406
}
406
407
}
407
- foreach ( var index in toDelete ) {
408
- instance . dccOptionPaths . RemoveAt ( index ) ;
408
+ foreach ( var str in pathsToDelete ) {
409
+ instance . dccOptionPaths . Remove ( str ) ;
410
+ }
411
+ foreach ( var str in namesToDelete ) {
412
+ instance . dccOptionNames . Remove ( str ) ;
409
413
}
410
414
411
415
if ( instance . dccOptionPaths . Count <= 0 ) {
You can’t perform that action at this time.
0 commit comments