Using Visual Studio Code with Unity

Using Visual Studio Code with UnityMicrosoft recently released Visual Studio Code, a cross-platform, lightweight IDE based on GitHub Atom worth considering as an alternative to MonoDevelop. Unity’s team has decided to stop distributing Unity with MonoDevelop for new Unity versions. Instead, you will get Visual Studio Community bundled. Unfortunately for Mac and Linux users, you’re still bound to use MonoDevelop as default. Let’s try something else!

Don’t confuse Visual Studio Code with the full version of Visual Studio. They are completely different applications! Visual Studio Code gives you only a small portion of what Visual Studio can do. It still can be quite powerful, though.

visual studio code running

Installing

To get started you need to download and install Visual Studio Code for your target platform. In order to do so, go to this page and download package suitable for your operating system. After you get the package, follow the standard installation procedure for your operating system.

Configuring Unity

In order to make your Unity editor work with Visual Studio Code, you have to unpack a UnityVS plugin into your project. Unfortunately, you have to repeat this process for all projects that you want to work on with Visual Studio Code.

After unpacking it, go to the Preferences window (Edit -> Preferences for Windows and Linux or ⌘, shortcut on Mac OS).

vscode preferences window

Here make sure that for VSCode tab Enable Integration checkbox is enabled. When done, you will be able to open your project using Open C# Project In Code menu option.

Possible issues

When running on MacOS it’s quite common to get an error like this one:

vscode omnisharp error

To fix this issue, run these commands to update mono:

Summary

You can find more information about VSCode and Unity here. If you won’t be satisfied with it, you can always remove the VSCode directory from your project and then automatically get back to MonoDevelop.

Editor Console Pro on the Unity Asset Store

Asset Review – Editor Console Pro

We’re starting a new series! Once in a while The Knights of Unity will be reviewing assets from the Asset Store. In the first post we will take a closer look at Editor Console Pro.

editor console pro in the Unity Asset Store

Overview

Editor Console Pro is an Unity editor extension and a replacement for standard Unity console window. Its primary objective is to make the best of Unity logs. The hottest feature is probably the ability to display source code snippets instead of raw backtrace file names and line numbers.

editor console pro screenshot 1

The first thing you may want to do after seeing the backtrace is going to source files and seeing where and how the log has been produced (or exception occurred.) It’s such a common thing to do that after you realize that displaying code snippets instead of line numbers works much better, you’ll wonder why haven’t you used it before! What’s more, clicking on any visible code line will take you directly to that place!

Another great feature is log filtering. Big games typically have lots of logs. Sometimes they may be used to debug a specific behavior and sometimes there are log messages that (maybe) should be there, but are not necessarily visible to you every time. For these and any other cases you can set up a filter. You are able to submit a quick filter (the filtering text input is always visible,) or define custom filters to be displayed right next to standard filters (these are Log, Warn, Error and Exception).

editor console pro quick filter

If this is not enough, can save your filters to preferences file, so when you’ll be working on a single project with other people, you’ll be able to share your filters with them!

There is also a special kind of filters called simply Ignore. It can be found in preferences window.

editor console pro ignore

Logs filtered with the use of these conditions will not be displayed in the console window. This will help you to hide logs you don’t want to see.

ECP is highly customizable as well. You can choose your own font, font size, decide which columns should be visible. There are also other options that you will find in the preferences window.

The quality

Editor Console Pro asset is distributed as a DLL library. It’s a wise choice for editor extensions, because it works even when Unity fails to compile project scripts when started. The downside is that the source code is not available for the customer.

I never had any issues with Editor Console Pro except one. Prior to Unity 5 you could only set one log callback (for getting log messages from inside the engine). By trying to read the logs you were forced to remove any previously set callback. No need to mention that ECP was using this particular callback to get the logs for itself. This gave me a serious headache for a short period.

The documentation

This type of asset does not need a lot of documentation, but one short readme file is, to be honest, too little. It would be nice of the author if he could prepare an illustrated PDF or more web page content.

Summary

 

Asset Store URL: https://www.assetstore.unity3d.com/en/#!/content/11889?aid=1011lGBH

Pros

  • Great quality
  • Actively supported
  • Low price ($30)
  • Really makes a difference

Cons

  • No sources, only dll
  • Documentation could be better

Score: 8 / 10