-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,32 @@ | ||
# UniVSCode | ||
Opens C# files from Unity3D in VSCode | ||
UniVSCode is a script that simplifies using Visual Studio Code with Unity on a Mac. | ||
|
||
To setup VSCode for Unity check out this tutorial: http://unreferencedinstance.com/how-to-integrate-visual-studio-code-with-unity3d-project/ | ||
##Requirements | ||
#####1. Install and Setup VSCode: http://unreferencedinstance.com/how-to-integrate-visual-studio-code-with-unity3d-project/ | ||
#####2. Copy UniVSCode.cs and SimpleJSON.cs into somewhere your project folder | ||
[UniVSCode.cs](https://github.com/robin7331/UniVSCode/blob/master/UniVSCode.cs) | ||
|
||
After VSCode is running and your project is set up simply copy the [UniVSCode.cs](https://github.com/robin7331/UniVSCode/blob/master/UniVSCode.cs) file somewhere into your Unity Project. | ||
Every *.cs file will then be opened by Visual Studio Code. | ||
If you double click on console errors, warnings oder other logs, your file will be opened at the specific line. | ||
[SimpleJSON.cs](https://github.com/robin7331/UniVSCode/blob/master/SimpleJSON.cs) | ||
#####3. You are now ready to use UniVSCode! | ||
|
||
To disable UniVSCode and use the app you've selected in your Unity settings, simply deactivate UniVSCode in the edit menu. | ||
##This is what you can do: | ||
#####1. Easily open the whole project folder in VSCode from Unity | ||
![menu screenshot 1](https://raw.githubusercontent.com/robin7331/UniVSCode/master/readme/open_project.jpg) | ||
#####2. Open c# files through a double click in your project view | ||
This will open the file in your already opened project window of VSCode | ||
#####3. Open c# files at the correct line via double click in your console | ||
Very convenient since it works with Logs, Errors, Warnings, ... | ||
#####4. Send all debugging port information automatically to VSCode | ||
![menu screenshot 2](https://raw.githubusercontent.com/robin7331/UniVSCode/master/readme/send_port.jpg) | ||
![menu screenshot 2](https://raw.githubusercontent.com/robin7331/UniVSCode/master/readme/debug.jpg) | ||
|
||
The port will be written to your launch.json file in VSCode so you can simply hit "Play" in VSCode to debug. | ||
Be sure that you are in Play mode in Unity before hitting Play in VSCode. | ||
Every time you hit Play in Unity, you have to send the debug information to VSCode. | ||
This is because Unity is changing it's debugging port on every session. | ||
|
||
#####NOTE: Unity will crash when you debug your code. This is a bug in Unity which I already filed. Once there is a fix for this it will be published here. | ||
|
||
|
||
####To disable UniVSCode and use the app you've selected in your Unity settings, simply deactivate UniVSCode in the edit menu. | ||
![menu screenshot](https://raw.githubusercontent.com/robin7331/UniVSCode/master/readme/menu.png) |