Skip to content

Commit 48afdf4

Browse files
author
AJubrey
committed
[CHANGED] made a more robust way to check our comparing apps
1 parent 430d507 commit 48afdf4

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,21 +452,33 @@ private int ChoosePreferredDCCApp(int optionA, int optionB)
452452

453453
for( int i = 0; i < s_PreferenceList.Count; i++ )
454454
{
455-
if (appA.StartsWith(s_PreferenceList[i]))
455+
//The constant without any spaces
456+
string currentApp = s_PreferenceList[i].Replace(" ", "");
457+
//The potential app, without any numbers or spaces
458+
string comparingApp = System.Text.RegularExpressions.Regex.Replace(appA, @"[\s^0-9]", "");
459+
460+
if (currentApp.Equals(comparingApp))
456461
{
457462
scoreA = i;
458463
break;
459464
}
465+
460466
}
461467

462468
for (int i = 0; i < s_PreferenceList.Count; i++)
463469
{
464-
if (appB.StartsWith(s_PreferenceList[i]))
470+
//The constant without any spaces
471+
string currentApp = s_PreferenceList[i].Replace(" ", "");
472+
//The potential app, without any numbers or spaces
473+
string comparingApp = System.Text.RegularExpressions.Regex.Replace(appB, @"[\s^0-9]", "");
474+
475+
if (currentApp.Equals(comparingApp))
465476
{
466477
scoreB = i;
467478
break;
468479
}
469-
}
480+
}
481+
470482
return scoreA < scoreB ? optionA : optionB;
471483
}
472484

0 commit comments

Comments
 (0)