Warning: Declaration of radium_walker::start_lvl(&$output, $depth) should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array) in /home/jenaylor/public_html/wp-content/themes/blooog/lib/functions/navigation/menu.php on line 11

Warning: Declaration of radium_walker::end_lvl(&$output, $depth) should be compatible with Walker::end_lvl(&$output, $depth = 0, $args = Array) in /home/jenaylor/public_html/wp-content/themes/blooog/lib/functions/navigation/menu.php on line 11

Warning: Declaration of radium_walker::start_el(&$output, $item, $depth, $args) should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in /home/jenaylor/public_html/wp-content/themes/blooog/lib/functions/navigation/menu.php on line 11

Warning: Declaration of radium_walker::end_el(&$output, $item, $depth) should be compatible with Walker::end_el(&$output, $object, $depth = 0, $args = Array) in /home/jenaylor/public_html/wp-content/themes/blooog/lib/functions/navigation/menu.php on line 11

Warning: Declaration of Radium_DropDown_Nav_Menu::start_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /home/jenaylor/public_html/wp-content/themes/blooog/lib/functions/navigation/mobile-nav.php on line 141

Warning: Declaration of Radium_DropDown_Nav_Menu::end_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::end_lvl(&$output, $depth = 0, $args = Array) in /home/jenaylor/public_html/wp-content/themes/blooog/lib/functions/navigation/mobile-nav.php on line 141

Warning: Declaration of Radium_DropDown_Nav_Menu::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = Array, $id = 0) in /home/jenaylor/public_html/wp-content/themes/blooog/lib/functions/navigation/mobile-nav.php on line 141

Warning: Declaration of Radium_DropDown_Nav_Menu::end_el(&$output, $item, $depth) should be compatible with Walker_Nav_Menu::end_el(&$output, $item, $depth = 0, $args = Array) in /home/jenaylor/public_html/wp-content/themes/blooog/lib/functions/navigation/mobile-nav.php on line 141

Warning: Parameter 1 to wp_default_styles() expected to be a reference, value given in /home/jenaylor/public_html/wp-includes/plugin.php on line 571

Warning: Parameter 1 to wp_default_scripts() expected to be a reference, value given in /home/jenaylor/public_html/wp-includes/plugin.php on line 571
Josh Naylor. | Unity + Visual Studio Code. #unitytips

All things game development

Published: 5 years ago

Unity + Visual Studio Code. #unitytips

It’s long been a pain point when developing a Unity game having to use MonoDevelop as the IDE. Originally I never thought it was that bad, but after using Unity VS with Visual Studio on my Desktop Windows PC I realised it really is much greener on the other side, but one problem. I needed a Mac for work to support multiple platforms for demonstrations and to help developers with iOS games, I didn’t fancy booting into parallels every just to use Visual Studio for everyday development. Other packages such as Sublime are great but they lack Inelltisense (auto-completion) , which for me really speeds up development time especially when coding/demoing live in front of 100 people, I don’t want to be stuck missing a Capitalisation of some random rigid body for someone to have to point it out.

Anyway, I longer have to endure Mono Develop and I no longer have to jump onto my desktop or parallels because Visual Studio Code is here! It’s a lightweight version of the full Visual Studio with Intellisense, debugging and Git integration, and it’s available for PC, Mac and Linux, Wowzers right?!

It’s also pretty damn sexy, with a similar style to Sublime.

For some reason on the website for VS Code it says it’s for node.js and asp.net development, nothing about C# or integration with Unity which led a lot of people to ask, “when will it be integrated with Unity?” Well it already is, great news, I posted a few screenshots the day it was released on Twitter and the Unity3d sub-reddit and had a lot of responses asking how, so here it is.

1. Open Visual Studio Code.

You can use VS code as a text editor like you would Sublime, Notepad, Notepad++ by simply opening a .cs file for quick and easy editing, but I want to set it up with my full solution.

2. Open your Unity Project.

You need to select the base project folder, just like you do when opening a full Unity project.

3. Select the correct Project

Your project will be in VS Code but you need to connect the correct solution file, on the bottom left, it’ll show you how many different projects are available. You need the one that has “nameOfProject”-csharp.sln rather than the one that shows “nameOfProject”.sln.

4. Code and be happy

Locate your scripts and open one up, you should not have full auto completion just like using Visual Studio or Monodevelop. Good luck with your projects.

5. Set Visual Studio Code as the default IDE in Unity.

– Mono runtime may need updating to get everything to work
– No debugging yet for Unity, hopefully coming soon.
– This is still in 0.1.0 preview mode so many things might change; I’d love to be even more tightly packed with Unity.

There are packages on github already to extend VS code functionality with Unity but I’ve not tried them yet
– https://gist.github.com/mwegner/86d7d4266089fa5cbe64
– https://github.com/kode80/VSCUnity

Have a Comment?


Some HTML is OK