![]() In recent versions this doesn't seem to be the case, as the WindowStyle now applies to all processes, hence why the window wasn't being shown. One of the most common ways is via the PowerShell console. Setting the external script editor to the exe worked with prior versions of VSCode - even when using ProcessWindowStyle.Hidden - as I'm fairly sure VSCode was creating the graphical window as a different process (or some other magic) - therefore ignoring the ProcessStartInfo.WindowStyle set when launching the process. Once you have a script ready, there are a few different ways you can execute a PowerShell script file. I've suggested that this flag should be conditionally set based on whether the cmd or the exe is selected in the Unity Editor preferences, and perhaps based on the version of VSCode installed. bashrc file, replacing the example path with the location of your chosen directory containing generatepbs. exe in older versions of VSCode (which is a good idea if you don't want a console window hanging around every time you open a script). To install the script for use in a Linux system, place it somewhere in your home directory where you store executable scripts (a common choice is to create /scripts or /bin for this purpose). It seems kinda obvious, but as far as I can tell, this was done to hide the intermediary console window that would otherwise be shown if launching using the. Changing the ProcessStartInfo.WindowStyle to ProcessWindowStyle.Normal fixes this. So when double clicking on a script, a VSCode process is indeed opened, but the Window is not shown. Taking a look at VSCodeScriptEditor.cs (in the package), at line 182 it seems that the Process is being created using the ProcessStartInfo.WindowStyle property set to Hidden. The issue does reproduce when External Script Editor is set via Browse.-> ![]() The issue is reproducible with Visual Studio Code version 1.38.1 with Unity Debugger Extension enabledĥ. No Visual Studio Code instance may be visible in the Task Manager, but the cursor's spinning wheel animation will indicate that something is loadingĤ. After reproducing the issue, scripts won't open even when opening them directly via right-click -> Open With. 2019.2.0a12 is the version where VSCode package has been introducedĢ. Make sure the External Script Editor is set to code.exeĮxpected results: A script is opened without any issuesĪctual results: A script is not opened, code.exe is visible in the Task Manager Open the "VSCode_issue" project using the EnvIronman VMĢ.
0 Comments
Leave a Reply. |