Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wkwan/unityvshotkey
A two-part plugin that lets you switch between Unity and Visual Studio by pressing CTRL-1. The Unity Editor script focuses VS when in Unity, and the VS plugin focuses Unity when in VS.
https://github.com/wkwan/unityvshotkey
Last synced: 7 days ago
JSON representation
A two-part plugin that lets you switch between Unity and Visual Studio by pressing CTRL-1. The Unity Editor script focuses VS when in Unity, and the VS plugin focuses Unity when in VS.
- Host: GitHub
- URL: https://github.com/wkwan/unityvshotkey
- Owner: wkwan
- License: mit
- Created: 2015-04-30T17:56:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-30T20:31:50.000Z (over 9 years ago)
- Last Synced: 2023-08-12T06:37:21.161Z (over 1 year ago)
- Language: C#
- Homepage: http://www.voidupdate.com
- Size: 354 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UnityVSHotkey
A two-part plugin that lets you switch between Unity and Visual Studio by pressing CTRL-1. The Unity Editor script brings VS to the foreground when in Unity, and the VS plugin brings Unity to the foreground when in VS.This package is tested on Windows 8 using Visual Studio 2013 Community Edition with Visual Studio 2013 Tools for Unity and Unity v5.0.1f1.
Assuming you have Visual Studio Tools for Unity in your Unity project, the Unity script works out of the box. Just drag the UnityVSHotkey folder into your Assets folder. You can now press CTRL-1 in Unity to focus VS (or open it if it isn't already).
*Aside: If you don't have Visual Studio Tools for Unity, it will keep opening a new instance of VS each time you hit CTRL-1, since it's looking for a window with the title: "UnityVS.\ - Microsoft Visual Studio". This code could be made more robust, I tried to get it to use the process name instead but I couldn't get a handle to the window.*
To install the VS plugin, either go to the menu and select UnityVSHotkey -> Install VS Plugin or open the GoToUnity Visual Studio Extension in the UnityVSHotkey directory. The plugin can be deleted after installation. You can now press CTRL-1 in VS to focus Unity (it won't open if it isn't already).
The source code for the VS Plugin is in the folder VSPluginSource. You can delete it if you don't want to modify it.
If you want to change the shortcut keybinding, you'll need to change it on both the Unity side and the VS side.
In Unity:
You will see a line like this inside Hotkey.cs:
```
[MenuItem("UnityVSHotkey/Go to Visual Studio %1")]
```Change %1 to whatever you want.
In VS:
Take the VS zipped source code outside of the Unity project and unzip it. In the GoToUnity folder there is a file called GoToUnity.vsct. Look for:
```
```
Change key1 and mod1 to whatever you want. Open the solution in VS and rebuild. The new installer can be found at VSPluginSourceCode -> GoToUnity -> bin -> Debug/Release.I would make a Unity menu option for changing both hotkeys in one go, except I'm not sure it's possible.