File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -293,14 +293,18 @@ public static string[] DCCVendorLocations {
293
293
{
294
294
int appIndex = location . IndexOf ( "Maya.app" ) ;
295
295
296
- //If we found 'Maya.app' in the location string, we're going to trim it and everything after it out
297
- //This way our possibleLocation will be more uniform between windows and mac
298
- if ( appIndex >= 0 &&
299
- Directory . GetParent ( location ) != null &&
300
- Directory . GetParent ( Directory . GetParent ( location ) . ToString ( ) ) != null )
296
+ //If we found 'Maya.app' in the location string, we're going to trim it and everything after it out.
297
+ //This way our possibleLocation will be more uniform between windows and mac.
298
+
299
+ //get everything up until 'maya.exe'
300
+ string subLocation = location . Substring ( 0 , ( appIndex - 1 ) ) ;
301
+
302
+ var parentDirectory = Directory . GetParent ( subLocation ) ;
303
+
304
+ if ( appIndex >= 0 && parentDirectory != null )
301
305
{
302
- possibleLocation = location . Substring ( 0 , ( appIndex - 1 ) ) ;
303
- possibleLocation = Directory . GetParent ( Directory . GetParent ( possibleLocation ) . ToString ( ) ) . ToString ( ) ;
306
+ possibleLocation = parentDirectory . ToString ( ) ;
307
+ Debug . Log ( possibleLocation . ToString ( ) ) ;
304
308
}
305
309
}
306
310
You can’t perform that action at this time.
0 commit comments