@@ -14,8 +14,15 @@ class Integrations
14
14
private const string VERSION_FIELD = "**Version**" ;
15
15
private const string VERSION_TAG = "{Version}" ;
16
16
private const string PROJECT_TAG = "{UnityProject}" ;
17
- private static string MAYA_COMMANDS { get { return string . Format ( @"configureUnityOneClick {1}{0}{1};" , Integrations . GetProjectPath ( ) , @"" + ( char ) 34 ) ; } }
18
-
17
+ private static string MAYA_COMMANDS { get {
18
+ #if UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX
19
+ return string . Format ( @"configureUnityOneClick {1}{0}{1};" ,
20
+ Integrations . GetProjectPath ( ) , @"" + ( char ) 34 ) ;
21
+ #else
22
+ return string . Format ( "configureUnityOneClick \\ {1}{0}\\ {1};" ,
23
+ Integrations . GetProjectPath ( ) . Replace ( "\\ " , "/" ) , @"" + ( char ) 34 ) ;
24
+ #endif
25
+ } }
19
26
private static Char [ ] FIELD_SEPARATORS = new Char [ ] { ':' } ;
20
27
21
28
private const string MODULE_TEMPLATE_PATH = "Integrations/Autodesk/maya" + VERSION_TAG + "/unityoneclick.mod" ;
@@ -189,7 +196,7 @@ public static int ConfigureMaya(string version)
189
196
}
190
197
191
198
myProcess . StartInfo . FileName = mayaPath ;
192
- myProcess . StartInfo . Arguments = string . Format ( "{0} -command '{1}'" , mayaPath , MAYA_COMMANDS ) ;
199
+ myProcess . StartInfo . Arguments = string . Format ( "-command \" {0} \" " , MAYA_COMMANDS ) ;
193
200
#endif
194
201
myProcess . EnableRaisingEvents = true ;
195
202
myProcess . Start ( ) ;
0 commit comments