26
2015
Useful Settings for Visual Studio 2015 + Unity
Finally installed VisualStudio with unity, 2015 community edition (update 1) seems pretty good so far (new monodevelop was too bugged..)
Here’s some common settings to go look for when customizing the vs editor.
—
SOURCE CODE MINIMAP
Quick launch command: scroll bars (select text editor > c# scroll bars)
—
LINE NUMBERS
Quick launch command: line numbers (select Text editor > all languages > general)
—
CUSTOM SHORTCUT KEYS
Feature: F1 for Unity API help search
Quick launch command: shortcut (select environment > keyboard)
—
Feature: § key for “Go to Declaration” (the key before “1”, its ` key in most keyboards).
Quick launch command: shortcut (select environment > keyboard)
Note: Cannot assign § as Global shortcut, so need to select “Use new shortcut in: Text Editor”
—
Feature: Shift+§ key for “Find All References”
Quick launch command: shortcut (select environment > keyboard)
—
Feature: F12 shortcut key for “Format Document”
Quick launch command: shortcut (select environment > keyboard)
—
SOURCE CODE FORMATTING
Feature: Keep “} else {” braces in same line
Quick launch command: formatting (select text editor > c# > formatting)
Deselect those 3 options below:
—
Adding support for Unity shader syntax highlighting
Download NShader for 2015 here: http://www.horsedrawngames.com/shader-syntax-highlighting-in-visual-studio-2013/
Installing NShader: Unzip “NShader_2015.zip” double click the “NShader.vsix” and its done
Those default colors are quite horrible, but can adjust them at Fonts and Colors settings
—
Tip: Removing unused extensions
Quick launch command: extensions (select tools > Extensions & updates..)
Then uninstall anything that you don’t need (i only left NuGet and that Unity package)
—
Fixing “Inconsistent Line Endings” warning
Quick launch command: documents (select Environment > documents)
Or convert line endings for the current document
Quick launch command: save (select File > advanced save options..)
—
Other things:
– There is no UnityScript support anymore, learn c# 🙂
– I unistalled all the SQL server related packages, silverlight, helpviewer etc. from add-remove programs in windows, they come with VS minimum install..
– Unity installer doesn’t allow installing VS to other drives, its forced to C: drive, which is annoying.. tried to uninstall VS, re-install by manually downloading VS + unity plugin, but it didnt allow changing the target folder, its grayed out.. still have to look for some solution to that, there is no proper full uninstaller for VS2015 community update 1 either..
What i’m still missing:
– API help should open to separate browser, not inside VS and not IE
– Duplicate line shortcut (i think in mono CTRL+D used to work), although currently you still can do CTRL+C, then CTRL+V (without anything selected it duplicates the current line)
– Would be nice to have that “Refactor/using system.io..” in right click menu, instead of the slow dropdown.. (when you write File.Exists(), right clicking File would allow adding the using System.IO..)
– Pressing F5 in VS would compile scripts, and hit play in unity..
—
Separate VS Downloads *These are also included in unity installer if you select [x] Visual studio there
– Visual Studio Community (free) : https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx
– VS Tools for Unity (free) : https://www.visualstudio.com/en-us/features/unitytools-vs.aspx
Related Posts
20 Comments + Add Comment
Leave a comment
Recent posts
- MotionVector Effect: Object “disappears” when paused
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
Recent Comments
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
Thanks, didnt know formating was there 😀
Thx, I didn’t know about the Quicklaunch, very helpfull for know about UnityAPI
This might help having less of those “solution has been modified outside the environment” – messages:
“Options/Environment/Documents and checking Auto-load changes, if saved”
http://forum.unity3d.com/threads/ide-insanity-visual-studio-monodevelop-and-xamarin.356569/#post-2442392
Maybe it’s too late, but about API question:
In the options you can change which way to open documentation.
Options — Tools for Unity — Use external browser [True]
Finally! Thanks!!
one more annoying feature, pressing CTRL+Z to undo, undoes only 1 character at a time.. would rather undo whole word at least..
haven’t seen solutions yet..
http://stackoverflow.com/questions/5767520/visual-studio-undo-one-letter
Create and share Visual Studio color schemes
https://studiostyl.es/
Shader extension for VisualStudio 2015
http://forum.unity3d.com/threads/free-shaderlabvs-visual-studio-extension-for-unity-shaderlab-programming.425922/
Rainbow Braces, Keyword Highlighting
https://marketplace.visualstudio.com/items?itemName=TomasRestrepo.Viasfora
This Add-in converts the text format of a file when it is saved in Visual Studio
http://www.grebulon.com/software/stripem.php
in 2017 can download Visual Studio Tools for Unity as a component
https://forum.unity3d.com/threads/support-for-visual-studio-2017-rc1.444124/#post-3045829
jump to matching Braces, set your shortcut key at
Tools>Options>Environment>Keyboard, for command: Edit.GotoBrace
vs2015 show vertical lines for matching braces
https://stackoverflow.com/a/20424258/5452781
Remove Context Switcher navigation bar
“Tools > Options > Text Editor > All Languages > Navigation Bar”
https://stackoverflow.com/a/23682387/5452781
Unity + Visual Studio 2017 intellisense extremely slow? Disable/uninstall vs extensions, restart vs, autocomplete appears 10 times faster! *although when i enabled them back, its still fast.. so i’m not sure what fixed it..
ok so its a known bug.. using vs2019 is supposed to be better.
https://forum.unity.com/threads/visual-studio-intellisense-slow-down.666412/#post-4984919
vs 2019
hide reference count line
search: codelens
then turn it off
vs 2019
hide updates popup
search: updates
disable: environment > extensions > check for updates
remove “open in visual studio”-context menu item
https://superuser.com/a/1192205
edit default snippets to make them better:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC#\Snippets\1033\Visual C#
https://stackoverflow.com/a/48579598/5452781