File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -161,10 +161,6 @@ public override void OnInspectorGUI() {
161
161
FbxExporters . Editor . IntegrationsUI . InstallMayaIntegration ( ) ;
162
162
}
163
163
164
- if ( GUILayout . Button ( "Install Max Integration" ) ) {
165
- FbxExporters . Editor . MaxIntegration . InstallMaxPlugin ( ) ;
166
- }
167
-
168
164
GUILayout . FlexibleSpace ( ) ;
169
165
GUILayout . EndScrollView ( ) ;
170
166
Original file line number Diff line number Diff line change @@ -449,9 +449,6 @@ public static int InstallMaxPlugin(){
449
449
myProcess . StartInfo . Arguments = string . Format ( "-q -silent -mxs \" {0}\" " , installScript ) ;
450
450
#endif
451
451
myProcess . EnableRaisingEvents = true ;
452
-
453
- Debug . Log ( "args: " + myProcess . StartInfo . Arguments ) ;
454
-
455
452
myProcess . Start ( ) ;
456
453
myProcess . WaitForExit ( ) ;
457
454
ExitCode = myProcess . ExitCode ;
@@ -465,5 +462,23 @@ public static int InstallMaxPlugin(){
465
462
}
466
463
return ExitCode ;
467
464
}
465
+
466
+ }
467
+
468
+ class MaxIntegrationUI {
469
+ [ MenuItem ( "FbxExporters/Install Max Integration" , false , 0 ) ]
470
+ static void OnMenuItem ( MenuCommand command )
471
+ {
472
+ int exitCode = MaxIntegration . InstallMaxPlugin ( ) ;
473
+ string title , message ;
474
+ if ( exitCode != 0 ) {
475
+ title = "Failed to install 3DsMax Integration." ;
476
+ message = string . Format ( "Failed to configure 3DsMax, please check logs (exitcode={0})." , exitCode ) ;
477
+ } else {
478
+ title = "Completed installation of 3DsMax Integration." ;
479
+ message = "Enjoy the new \" Unity\" menu in 3DsMax." ;
480
+ }
481
+ UnityEditor . EditorUtility . DisplayDialog ( title , message , "Ok" ) ;
482
+ }
468
483
}
469
484
}
You can’t perform that action at this time.
0 commit comments