File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,18 +214,27 @@ export class UnityEditor {
214214 } else {
215215 if ( process . platform === 'darwin' && this . version . architecture === 'X86_64' && process . arch === 'arm64' ) {
216216 // Force the Unity Editor to run under Rosetta 2 on Apple Silicon Macs if the editor is x86_64
217- command . args . unshift ( 'arch' , '-x86_64' ) ;
217+ command . args . unshift ( '-x86_64' , this . editorPath ) ;
218+ unityProcess = spawn (
219+ 'arch' ,
220+ command . args , {
221+ stdio : [ 'ignore' , 'ignore' , 'ignore' ] ,
222+ env : {
223+ ...process . env ,
224+ UNITY_THISISABUILDMACHINE : '1'
225+ }
226+ } ) ;
227+ } else {
228+ unityProcess = spawn (
229+ this . editorPath ,
230+ command . args , {
231+ stdio : [ 'ignore' , 'ignore' , 'ignore' ] ,
232+ env : {
233+ ...process . env ,
234+ UNITY_THISISABUILDMACHINE : '1'
235+ }
236+ } ) ;
218237 }
219-
220- unityProcess = spawn (
221- this . editorPath ,
222- command . args , {
223- stdio : [ 'ignore' , 'ignore' , 'ignore' ] ,
224- env : {
225- ...process . env ,
226- UNITY_THISISABUILDMACHINE : '1'
227- }
228- } ) ;
229238 }
230239
231240 if ( ! unityProcess ?. pid ) {
You can’t perform that action at this time.
0 commit comments