Rider is JetBrains' cross platform .NET IDE, based on ReSharper and the IntelliJ Platform. It can be used on Windows, Mac and Linux and this plugin can replace the default MonoDevelop editor with an IDE providing rich code navigation, inspections and refactorings.
The plugin adds code completion and generation of Unity event functions, inspections for common errors, quick fixes, support for
.shader files, automatic handling of
.meta files and more. The Rider plugin includes additional support for attaching the debugger to the Editor instance and a Unity Editor plugin to improve integration.
In Unity choose Rider as External Editor in Unity settings.
For uninstall choose a different External Editor in Unity settings.
This plugin comes bundled with Rider, and manual installation is not required. However, it is necessary to configure Unity to use Rider as the external script editor:
.slnfile is present:
.slnfile. Rider will install a Unity Editor plugin into the project (see below for more details)
This only needs to be done once, and can also be done manually, via the Unity Editor's External Editor Preference pane.
Double clicking on C# scripts and
.shader files will now automatically open Rider, load the solution and navigate to the file. More file types can be associated with Rider by editing Additional extensions in the Edit → Project Settings → Editor settings pane.
The solution can be loaded directly with the Assets → Open C# Project menu item.
Note that Rider will add an Assets → Open C# Project in Rider menu item for older versions of Unity. This is because prior to 2017.1, the Unity Editor doesn't recognise Rider as an editor that can load C# solutions, and will also launch MonoDevelop. Other than not launching MonoDevelop, these menu items are identical.
Rider will install the Unity Editor plugin in each Unity project it opens. See below for more details.
For uninstall choose a different external Editor in Unity settings, delete Editor plugin from your project.
The ReSharper plugin is installed via the ReSharper → Extension Manager. Simply search for "Unity Support".
Unity API knowledge:
EditorWindow, etc.) and their event functions via analysis of the Unity API surface and documentation.
Event functions and fields implicitly used by Unity are marked with an icon in the gutter.
Empty event functions are marked as dead code, with a Quick Fix to remove the method.
When Solution Wide Analysis is enabled, implicitly used fields and event functions are marked as in use. Fields are highlighted if they aren't accessed in your code.
A new "Generate Unity event function" menu item is added to the Alt+Insert Generate Code menu, to generate event functions via GUI. This action is also available from Alt+Enter on a Unity based class's name.
Auto complete will suggest event function names when declaring methods in Unity based classes, and expand to include method signature. Simply start typing an event function within a class deriving from a known Unity class, such as
Incorrect method signatures and return types are shown as warnings, with a Quick Fix to create the correct signature.
Optional parameters are called out in a tooltip, and marked as unused if not used in the body of the method, e.g.
Suppress naming consistency warnings for known Unity event functions. E.g. ReSharper no longer suggests that
AnimatorIK be renamed to
Descriptions for event functions and parameters in Unity based classes are shown in tooltips and QuickDoc. To show the information in tooltips, ReSharper's "Colour identifiers" and "Replace Visual Studio tooltips" setting must be enabled (search for them in settings). Alternatively, use the excellent Enhanced Tooltip plugin.
"Read more" in QuickDoc will navigate to the Unity API documentation, locally if available, or via the Unity website.
Coroutines and invokable methods:
Event functions that can be coroutines are called out in tooltips.
Context Action on methods that can be coroutines to convert method signature to/from coroutine.
Warnings for unused coroutine return values.
Code completion, find usages and rename support for string literals in
CancelInvoke. Also supports
StopCoroutine and understands overloads here.
[SyncVar(hook = "OnValueChanged")].
SyncVarAttributein any class other than
NetworkBehaviouras an error.
Inspections and Quick Fixes:
Empty event functions are shown as dead code, with a quick fix to remove the method.
SyncVarAttribute inside any class other than
NetworkBehaviour is treated as an error.
Inspection and Quick Fix to use
CompareTag instead of string comparison.
"Create serialized field" from usage of unresolved symbol.
Inspections and Quick Fixes for incorrect event function signatures and return types.
Inspections and Quick Fixes for incorrect method or static constructor signatures for
Inspections for incorrectly calling
new on a
ScriptableObject. Quick Fixes will convert to calls to
Inspection for unused coroutine return value.
Initial support for ShaderLab syntax in
.shader files, with limited support for Cg/HLSL blocks.
Syntax and syntax error highlighting for ShaderLab syntax.
Colours highlighting and editing.
Also available in Rider:
Rider includes simple word based completion (so called "hippie completion"). This provides completion based on words found in the current file. This is not available in ReSharper.
Brace matching and highlighting, comment/uncomment, and to-do explorer support.
Code folding in Rider.
Cg/HLSL (Rider only):
Syntax highlighting for
CGINCLUDE blocks and
.cginc files. Currently no syntax error highlighting.
Simple word based completion (so called "hippie completion").
See the ReSharper help for more details on External Annotations.
Debug.Assertmarked as assertion method to help null-value analysis (e.g. "value cannot be null" after
Debug.Assert(x != null))
LogFormat, etc. gets string formatting helper functionality.
Assertions.Assertmethods marked as assertion methods to help null-value analysis.
EditorTestsWithLogParser.ExpectLogLineRegexgets regular expression helper functionality.
[CustomEditor]requires a base class of
Project and File Templates:
Project template Unity Class Library *
Essentially it is a Class Library with reference to UnityEngine.dll
File templates for new C# script, tests and shader files.
Also available in Rider:
Support for editing and creating File Templates and Live Templates for Unity projects in ReSharper. Note that Rider currently doesn't support editing File and Live Templates. This is planned for Rider 2017.3)
Synchronise .meta files on creation, deletion, rename and refactoring.
Automatically sets correct C# language version, if not already specified in .csproj - ReSharper will no longer suggest code fixes that won't compile! Supports the default C# 4 compiler, Unity 5.5's optional C# 6 compiler and the C# 6/7.0 compiler in the CSharp60Support plugin.
Assets\Scripts folders from being considered as "namespace providers". This means ReSharper will no longer suggest to include
Scripts in the namespace of your code.
UnityEngine.Color32. The colour is highlighted, and hitting Alt+Enter will open the colour palette editor to modify the colour. Also supports named colours and
The plugin also adds some functionality just for Rider:
Temp folders are automatically excluded from Rider's full text search, used for the "Find in Path" feature. These folders can become very large, and can take a long time to index if not excluded.
Rider will automatically create an "Attach to Unity Editor" run configuration. When the debug button is clicked, Rider will automatically attach to the editor and start debugging. Rider will look for a
Library/EditorInstance.json file, created by Unity 2017.1, or by EditorPlugin. If the file doesn't exist and only a single instance of Unity is running, Rider will attach to this instance. If multiple instances are running, Rider will prompt for which instance to attach to.
Rider will install a Unity Editor plugin whenever a Unity project is opened. See below for more details.
Unity 2019.2+ with Rider packageEditor plugin is loaded directly from Rider installation.
By default, when Rider opens a Unity project, it will automatically install a Unity Editor plugin, and keep it up to date with new versions. This behaviour can be disabled in Rider's Preferences → Languages & Frameworks → Unity Engine.
This plugin does the following:
TargetFrameworkVersion. This is customizable in Preferences. Note that this affects how Rider resolves references, and does not change how Unity builds a project.
LangVersioncorrectly, so that Rider does not suggest C# 6 features when Unity is targeting C# 4, or C# 7 features when Unity is targeting C# 6.
UnityEditor.iOS.Extensions.Common.dll, which are referenced when Unity builds, but not included in the generated project files.
gmcs.rspfiles, such as conditional compilation defines, the
unsafekeyword and [references(https://github.com/JetBrains/resharper-unity/issues/270)]. Adding them to the project file makes the information available to Rider's analysis.
.shaderfiles and text assets in Rider, if it's already running. It will launch Rider and load the solution if it isn't.
TargetFrameworkVersionfor generated project files. Note that this only affects how Rider resolves references, and does not change how Unity builds a project.
Library/EditorInstance.jsonthat contains process information for debugging the Unity Editor. This file is created natively by Unity since 2017.1.
Rider will automatically add this plugin to all Unity projects that are opened. It will initially install the plugin to
Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll, but will look for the file by name if it is moved.
Supported Unity versions: 5.0+