To get started today, download Visual Studio for Mac and set it as the default editor in Unity. Visual Studio Community for Mac is free to use for students, open-source and individual developers, as well as small teams. Check out the license terms for more information. As always, let us know what you think in the comments below.
This is a quick quide on how to use Visual Studio with Unity. Visual Studio is only available for Windows, but a lot of Unity developers on Mac think it's so great they go through the hassle of using virtual machines just to use it.
If you're wondering why you should switch from Mono Develop there's a section devoted to that further down.
Install Visual Studio
- Firstly, you'll want to go here here and click 'Download' to download the tiny Visual Studio installer application.
- Run the installer application. You can opt out of all the extras, I did. We don't need any of them for Unity development. The installer claims that Visual Studio will use 8 GB split across all drives when you opt out of all the extras, but it still ate 10 GB of the drive I installed it to so keep that in mind. It's quite bloaty.
- You may be asked to create a Microsoft account or log in with your existing one. This is probably not necessary, but I already have a Microsoft account which I use for my Xbox so I just logged in with that. This will apparently allow you to synchronize settings etc. across different computers. Not something I'll use.
Now that Visual Studio is installed you can launch Unity. Inside Unity go to 'Edit' => 'Preferences' => 'External Tools' in the menu bar. Browse for an external script editor and navigate to 'C:Program Files (x86)Microsoft Visual Studio 12.0Common7IDE' and select 'devenv.exe'.
That's it, now you can edit your scripts in Visual Studio just like you would in Mono Develop. And if that was all that you wanted to do then you can close this tutorial and continue with your Unity project. But for those of you who want actual debugging there are still some steps left. At the moment If you click 'Start debugging' (F5) inside Visual Studio you'll get an error. Obvisouly we want to properly debug our code as well. Quit Unity and Visual Studio, not sure if this is necessary, but let's just play it safe. We'll have to install a plugin for Visual Studio and Unity.
Install Visual Studio Tools for Unity
- Go here and download the Visual Studio Tools for Unity. Get the one that corresponds to your version of Visual Studio. I have Visual Studio 2013 so I chose the corresponding version of Visual Studio Tools for Unity.
- Download the plugin.
- Install the plugin. This should be a one click installation.
Now you can launch Unity again, but this time go to 'Assets' => 'Import Package' and choose 'Visual Studio 2013 Tools' from the list. Doing this will properly configure this Unity project so that it can be debugged using Visual Studio.
Visual Studio Community For Unity Download Mac 10.13
NB: This will automatically configure your external editor settings, meaning the manual setup we did earlier isn't necessary. I just did that to show you how you could set it up if you didn't want or need debugging. For any future projects you just have to import the plugin and you're done. This can be done directly from the Unity launcher when you create the project.
Now that you've imported the Visual Studio for Unity plugin you'll notice that a 'Visual Studio Tools' menu item has appeared in the menu bar at the top. This has some settings etc. for the plugin. I haven't needed to touch these so I just left them alone. This plugin will make debugging inside Visual Studio work just as easily as it does inside Mono Develop. I'm assuming you already know how to debug your code so I won't go into that. However if you don't know, and you want to learn you can just ask me and I'll try to help you as best I can. There's also a lot of information available here.
Other features I also use are the Unity Project Explorer. It shows you your folders and scripts inside Visual Studio just as they appear inside the project window in Unity. The quick documentation access which lets me quickly go to the documentation page for a Unity method. And the Monobehaviour wizard which lets me quickly create methods like OnCollisionEnter etc. without having to remember their name exactly. This plugin offers a lot more functionality as well, I just haven't needed it myself yet. You can debug builds for example. Check out this link for more information about the features I've listed here and all the other features as well..
And that's it. Now you can do all the things Mono Develop allowed you to do in Visual Studio instead.
Why change from Mono Develop?
I've only told you how to get Visual Studio to do the same things you were already able to do in Mono Develop so why should you bother going through this hassle? If you are perfectly happy with Mono Develop and don't feel like there's anything wrong with it then there's probably not much I can say to change your opinion, but here are my pros and cons of using Visual Studio over Mono Develop.
- Mono Develop is one of the slowest IDE's I've worked with. Visual Studio is one of the fastest. I find that in larger projects or code files Mono Develop will slow to a crawl. Visual Studio isn't faced by this.
- I have two fairly persistent bugs with Mono Develop. The first is that Mono Develop will permanently stick on top of all my other windows. So it's impossible for me to ALT+TAB to Unity or any other application. The only fix is to restart Mono Develop. The second bug is that suddenly I can't interact with any part of the Mono Develop interface except for the text editor area. So I can't change tabs or do anything with the application itself. The only fix is of course to restart Mono Develop.
- Apart from these two I also have many smaller, equally annoying bugs. Sometimes the syntax highlighting would stop working, or it would stop highlighting errors, or the code completion dropdown would refuse to show.
- Mono Develop also crashes quite a few times entirely on its own. I've never experienced this with Visual Studio.
- I've also had no luck in getting my Unity errors to automatically show inside Mono Develop. I know I can get them in Mono Develop if I build my project in there, but this is cumbersome and unnecessary. In Visual Studio this just works. You can even see the Unity console inside Visual Studio.
- The Visual Studio code completion is lightning fast and precise compared to the one in Mono Develop.
- The developers of Mono Develop suddenly decided that they would stop showing column numbers. A feature every text editor has and every developer takes for granted. Because of this the Mono Develop error log can't even show you the column the error occurred on, which is pretty funny. Not a huge deal in itself, but it makes me question the competence of the people in charge. Visual Studio has an actual footer which shows you the current line number and column number just like you would expect. And the error log shows the column of the error, just like you would expect.
- I've given up trying to make Mono Develop try to respect my coding standards. It seems to reset to tabs instead of spaces, 120 column width, the wrong brace placement etc. every single time I open it. By comparison it's amazingly easy to customize Visual Studio to respect your coding style once and forever.
- Speed, speed, speed. I can't stress this enough. Visual Studio is so much faster than Mono Develop. Try writing some code in Mono Develop and then try writing the same piece of code in Visual Studio. You'll be amazed if you haven't used Visual Studio before. The automatic formatting, the code completion, everything is just so quick and snappy.
- Visual Studio is 10 GB, Mono Develop is 200 MB. Visual Studio comes with a ton of crud you'll never ever need.
- I haven't yet been able to configure the syntax highlighting in Visual Studio the way I want it. I think it's possible, but Mono Develop currently has better syntax highlighting in my opinion.
I haven't mentioned the debugger at all. That's because I haven't been able to use it much with Unity. I never used the Mono Develop debugger because I felt it was slow and cumbersome, and most recently I've only been using Visual Studio for about a week with Unity. I used it for years with XNA and I loved using the debugger there so I have no reason to think it has gotten worse, but I feel like I have to become acquainted with it again before I can voice my opinion about it. I used Visual Studio C# Express with Unity 2 before I switched to Mono Develop when Unity 3 came so I feel I have some experience with both editors, and I find Visual Studio to be the superior choice. With Mono Develop I felt like I had to ALT+TAB back and fourth between Unity all the time, with Visual Studio I rarely open the Unity editor at all.
But I've gotten used to the dark Mono Develop skin
Don't worry, I've got you covered.
The dark Mono Develop skin is called Oblivion and someone has made a version of it for Visual Studio available here. The FAQ here will tell you how to install this skin in Visual Studio. Keep in mind this is just for the text editor, not for the entire application. But often that's the only thing you care about. I chose the Visual Studio dark skin for the application and I think it goes great with the Oblivion text editor skin.
However, If neither the blue, dark or light application skin is to your liking you can install this plugin. It comes with a few custom skins for the entire application, and you can also create your own skin based on an existing one.
And that's it. Now your Visual Studio is configured just the way you want it and it should work flawlessly with Unity. If you're stuck on something or have any questions I'll be happy to help you. And if you're wondering why I've only recently switched from Mono Develop to Visual Studio it's because you used to need Visual Studio Pro to do this and it was very expensive. And when they made Visual Studio Pro free with the release of the Community Edition I wasn't paying attention. Let's just say that I hate myself for not finding out sooner, but I'm glad to be back with Visual Studio again.
This document illustrates some points where Unity framework support differs in JetBrains Rider, Microsoft Visual Studio, and Microsoft Visual Studio for Mac. Note that this document is an addition to the main comparison table, which lists general features of the products.
As the compared products are being actively developed and their functionality changes on a regular basis, we consider this comparison valid for specific releases that are indicated in the header of the comparison table.
Visual Studio Community Mac Os
If you discover any missing or inaccurate items in this table, please post a comment below to let us know, and we'll update the table as soon as possible.
Microsoft Visual Studio 2019 for Mac 8.2.5
|Built in support for Unity||Built in support for Unity||Built in support for Unity|
|Support for ||No matching functionality||Support for |
|Unity Project Explorer tool window shows file system view of Assets and Packages folders||Solution explorer includes Unity project view, showing file system view of Assets and Packages folders||Unity Explorer tool window shows Assets folder, and lists Packages, including local file packages, git packages, and read only packages and modules|
|ShaderLab file support||ShaderLab file support||Support for declared properties in ShaderLab files|
|Auto refresh assets (background compile)||No matching functionality||Auto refresh assets (background compile)|
|No matching functionality||No matching functionality||Show Unity Console log with parsed stack traces - click to navigate|
|No matching functionality||No matching functionality||Control play mode: enter play mode, pause, and step from the toolbar|
Navigation and search
|No matching functionality||No matching functionality||Find usages of |
|No matching functionality||No matching functionality||Navigate to usages of code inside Unity, highlighting game objects inside the Unity Hierarchy window|
|No matching functionality||No matching functionality||Go to Declaration and Find Usages support for coroutine names passed as string literal arguments|
|Code completion and generation of Unity event functions||Code completion and generation of Unity event functions||Code completion and generation of Unity event functions|
|Links to installed or online Unity documentation||Links to installed or online Unity documentation||Links to installed or online Unity documentation|
|2 file templates||3 file templates||15 File and 11 Live Templates for creating Unity related files, serialised fields, logging and more|
|No matching functionality||No matching functionality||Code completion and validation for tag, layer, scene and input names|
|No matching functionality||No matching functionality||Code completion, validation and rename for coroutine names passed as string literal arguments|
|No matching functionality||No matching functionality||10 Context Actions, including easy manipulation of Inspector related attributes for serialised fields|
|No matching functionality||No matching functionality||Summary documentation tooltips for Unity event functions|
|No matching functionality||No matching functionality||Code Vision shows usage count of classes and methods inside Unity scenes, prefabs and assets, inside the editor, with single click to Find Usages|
|No matching functionality||No matching functionality||Code Vision shows actual values of serialised fields, from scenes, prefabs and assets, with single click to Find Usages|
|Semantic highlighting for Unity event function declarations||No matching functionality||Semantic highlighting for Unity |
|No matching functionality||No matching functionality||38 Unity-related inspections, most including 'Why is Rider suggesting this?' explanations|
|No matching functionality||No matching functionality||27 Unity-specific quick-fixes|
|No matching functionality||No matching functionality||Classes, functions and serialised fields used implicitly by Unity are not marked as unused”|
|No matching functionality||No matching functionality||Highlights usage of expensive methods inside frequently called event functions, such as calling |
|No matching functionality||No matching functionality||Inspections, quick-fixes and context actions for known performance issues|
|No matching functionality||No matching functionality||dotTrace performance profiling of Unity editor on Windows, Mac and Linux|
|No matching functionality||No matching functionality||HeapAllocation plugin will highlight memory allocations generated by the compiler due to boxing, closures, etc.|
|Debugging Unity C# code out of the box||Debugging Unity C# code out of the box||Debugging Unity C# code out of the box|
|Automatically configure debugger to attach to Unity editor||Automatically configure debugger to attach to Unity editor||Automatically configure debugger to attach to Unity editor|
|Attach debugger to the editor and enter the play mode||Attach debugger to the editor and enter the play mode||Attach debugger to the editor and enter the play mode|
|Attach debugger to remote and standalone players||Attach debugger to remote and standalone players||Attach debugger to remote and standalone players|
|Debugging iOS and Android players based on IL2CPP (requires Unity 2018.2+)||Debugging iOS and Android players based on IL2CPP (requires Unity 2018.2+)||Debugging iOS and Android players based on IL2CPP (requires Unity 2018.2+)|
|Debugging iOS and Android via WiFi or USB||Debugging iOS and Android via WiFi or USB||Debugging iOS and Android via WiFi|
|Debugging DirectX 11/12 shaders||Debugging DirectX 11/12 shaders||No matching functionality|
|No matching functionality||No matching functionality||Android support: LogCat viewer, device explorer, profiling tools|
|No matching functionality||No matching functionality||Debugger extends certain Unity types with extra information: Scenes list all root game objects, |
|No matching functionality||No matching functionality||Run and debug Unity unit tests (only edit-mode tests, play-mode tests not yet supported)|