@@ -504,10 +504,15 @@ namespace Editors
504
504
class IntegrationsUI
505
505
{
506
506
const string MenuItemName1 = "FbxExporters/Install Maya Integration" ;
507
+ const string IntegrationZipPath = "FbxExporters/unityoneclick_for_maya.zip" ;
507
508
508
509
[ MenuItem ( MenuItemName1 , false , 0 ) ]
509
510
public static void OnMenuItem1 ( )
510
511
{
512
+ // unzip Integration folder
513
+ DecompressZip ( Application . dataPath + "/" + IntegrationZipPath , Application . dataPath + "/TestIntegrations" ) ;
514
+ return ;
515
+
511
516
var mayaVersion = new Integrations . MayaVersion ( ) ;
512
517
if ( ! Integrations . InstallMaya ( mayaVersion , verbose : true ) ) {
513
518
return ;
@@ -525,6 +530,22 @@ public static void OnMenuItem1 ()
525
530
}
526
531
UnityEditor . EditorUtility . DisplayDialog ( title , message , "Ok" ) ;
527
532
}
533
+
534
+ public static void DecompressZip ( string zipPath , string destPath ) {
535
+ System . Diagnostics . Process myProcess = new System . Diagnostics . Process ( ) ;
536
+ myProcess . StartInfo . FileName = string . Format ( "\" {0}\" " , EditorApplication . applicationContentsPath + "/Tools/7z.exe" ) ;
537
+ myProcess . StartInfo . WindowStyle = System . Diagnostics . ProcessWindowStyle . Hidden ;
538
+ myProcess . StartInfo . CreateNoWindow = true ;
539
+ myProcess . StartInfo . UseShellExecute = false ;
540
+
541
+ myProcess . StartInfo . Arguments = string . Format ( "x \" {0}\" -o\" {1}\" -r -y" , zipPath , destPath ) ;
542
+ myProcess . EnableRaisingEvents = true ;
543
+ myProcess . Start ( ) ;
544
+ myProcess . WaitForExit ( ) ;
545
+
546
+ Debug . Log ( "ran: " + myProcess . StartInfo . FileName + " " + myProcess . StartInfo . Arguments ) ;
547
+ Debug . Log ( "exported to: " + destPath ) ;
548
+ }
528
549
}
529
550
}
530
551
}
0 commit comments