Skip to content

Conversation

@mildmojo
Copy link

Sets proc.StartInfo.UseShellExecute to false so that the editor binary is called directly with exec instead of being launched with the system launcher.

I was trying to use this shim to glue Unity and Sublime Text 2 together in OSX. In the original source, the binary and arguments were passed to the OSX open command, which interpreted the file:line argument as another command to run. This pull request lets the shim run successfully with a line like mono UnityExternalScriptEditorHelper.exe /path/to/file.cs;10 at the command prompt.

Unfortunately, Unity for OSX doesn't recognize individual binaries or executable scripts when selecting an external script editor. It requires an app bundle. I wrote a shell script to call mono and this application, then tried many different ways of packaging that script into an app bundle, but the file:line argument never seemed to make it from Unity to the shell script.

So the last mile is still missing. These changes just clear up the errors. 😿 Maybe there's a better way to turn this mono app into a bundle.

Sets `UseShellExecute` to false so that the editor binary is called
directly with `exec` instead of being launched with `open`. This does
mean the shim will only work with actual binaries, not OSX app bundles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant