The current version of Unity uses the old MonoDevelop 2.8 which is very primitive. Not only that it cannot register compile errors, I am also unable to know which method I can use. Each time I want to use some built-in method (like OnGUI
or OnTriggerEnter
) I have to search them manually.
Since I am coming from the world of IntelliJ IDEA or Eclipse or VisualStudio, this is a very primitive way of working.
I tried using the latest Unity with the newest MonoDevelop 4.0, but I did not succeed.
Can you suggest a modern IDE which I can use with Unity, the one where I will enjoy coding?
“Rider is the best and only IDE that we use for Unity programming tasks. It saves a lot of time in our workflow, providing top-notch code analysis for C# with Unity-specific code inspections and quick-fixes.
Unity Development with VS Code. Visual Studio Code can be a great companion to Unity for editing C# files. All of the C# features are supported and more. In the screen below, you can see code colorization, bracket matching, IntelliSense, CodeLens and that's just the start.
To change the default IDE, an instance of the Unity Editor must be open. Open a pre-existing Unity project or create a new one via the Hub. Changing the IDE will apply to all other Unity projects which use that Unity version automatically.
For anyone just starting out with Unity, or anyone with previous knowledge of object-oriented programming, C# is the best Unity programming language to begin with. In fact, C# is the only Unity coding language worth learning for the platform, and with good reason.
Updated 02/08/2022
There's a new cross-platform .NET IDE by JetBrains - Rider with build-in resharper-like commands and quite a list of features including rich web development support and specifically Unity
Unity support
Comments: I've been using it for some time already and my impression is very positive. It's faster compared to Visual Studio and has some really awesome hotkey combos, not to mention support for AceJump and a ton of other useful extensions.
What does this feature get me?
A more sophisticated C# development environment. Think smart autocompletion, computer-assisted changes to source files, smart syntax highlighting and more.
What's the difference between Express and Pro?
VisualStudio C# 2010 is a product from Microsoft. It comes in an Express and a Profesional edition. The Express edition is free, and you can download it from here: http://www.microsoft.com/express/vcsharp/ The Professional edition is not free, you can find out more information about it here: http://www.microsoft.com/visualstudio/en-us/products/professional/default.mspx
Unity's VisualStudio integration has two components:
Assets->Sync VisualStudio Project
Note: With Microsoft's Acquisition of SyntaxTree, Visual Studio Tools for Unity (formerly known as UnityVS) has been released free of charge in the Visual Studio gallery.
This replaces the below steps for users of Visual Studio Professional and removes a number of caveats mentioned further below, allowing for debugging within VS, advanced project file integration, a mirrored console window withing VS, and more.
Edit->Preferences
, and make sure that Visual Studio is selected as your preferred external editor.A few things to watch out for:
Even though Visual Studio comes with its own C# compiler, and you can use it to check if you have errors in your c# scripts, Unity still uses its own C# compiler to compile your scripts. Using the Visual Studio compiler is still quite useful, because it means you don't have to switch to Unity all the time to check if you have any errors or not.
Visual Studio's C# compiler has some more features than Unity's C# compiler currently has. This means that some code (especially newer c# features) will not give an error in Visual Studio but will give an error in Unity.
Unity automatically creates and maintains a Visual Studio .sln
and .csproj
file. Whenever somebody adds/renames/moves/deletes a file from within Unity, Unity regenerates the .sln
and .csproj
files. You can add files to your solution from Visual Studio as well. Unity will then import those new files, and the next time Unity creates the project files again, it will create them with this new file included.
Unity does not regenerate the Visual Studio project files after an AssetServer update, or a SVN update. You can manually ask Unity to regenerate the Visual Studio project files trough the menu: Assets->Sync VisualStudio Project
Unity supports opening scripts in Visual Studio Code (VS Code). To open scripts in VS Code, go to Unity > Preferences > External Tools > External Script Editor and select Visual Studio Code. For information on using VS Code with Unity, see Visual Studio’s documentation on Unity Development with VS Code.
Prerequisites To use Visual Studio Code for C# code editing and Unity C# debugging support, you need to install:
Sources:
http://docs.unity3d.com/Documentation/Manual/VisualStudioIntegration.html https://docs.unity3d.com/Manual/ScriptingToolsIDEs.html
In Mac
1) Visual Studio Code
Lightweight
Support debug
https://code.visualstudio.com/
2) Consulo
Intellij IDEA based IDE
Support debug
https://github.com/consulo/consulo
3) Sublime Text also can be your choice on Mac.
Using Sublime Text as a script editor
There are some useful packages for unity too. (Code Completion, Syntax coloring...)
ST package for unity3d
And Video Tutorial
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With