You can start with watching this 3-minute video where Matt Ellis gives a short overview of JetBrains Rider features for Unity Development.
- JetBrains Rider marks classes, methods and fields that are implicitly used by Unity directly in the editor.
UnityEngine.Color32colors are highlighted, and hitting Alt+Enter will open the colour palette editor to modify the color. Also named colours and
- You can generate event functions using Unity Event Functions the Generate Code menu (Alt+Insert). This action is also available from Alt+Enter on a Unity-based class' name.
- Auto-completion 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
- Descriptions for event functions and parameters in Unity based classes are shown in tooltips and Quick Documentation.
Inspections and quick-fixes
- When the Solution-Wide Analysis is enabled, JetBrains Rider understands implicitly used fields and event functions and do not highlight them as not accessed.
- Empty event functions are shown as dead code, with a quick-fix to remove them.
- Using the
SyncVarAttributeinside any class other than
NetworkBehaviouris treated as an error.
- A quick-fix is suggested to create a serialized field from a usage of an unresolved symbol:
- JetBrains Rider ensures that all of your event functions have correct signatures: it highlights incorrect signatures and offers a quick-fix to correct them:
- JetBrains Rider warns you against using an inefficient string literal comparison with the
tagproperty, and provides a quick-fix to rewrite this as a call to
- JetBrains Rider warns you if you try to use the
newkeyword to create a new instance of a class deriving from
ScriptableObject. A quick-fix is suggested to use
- There are also inspections for the
[InitializeOnLoadMethod]attributes, ensuring that they have the correct method or constructor signatures, and JetBrains Rider will grey out a redundant
[InitializeOnLoad]attribute if the class doesn't have a static constructor, with a quick-fix to either quickly remove the attribute, or create the constructor.
- Treating code marked with attributes from
UnityEditor.dllas implicitly used.
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.
- Various attributes now require the class they are applied to derive from a specific base type. E.g.
[CustomEditor]requires a base class of
- Support for Unity 2017.2's modularised UnityEngine assemblies.
Support for .shader files
JetBrains Rider provides the initial support for ShaderLab syntax in
.shader files, with limited support for Cg/HLSL blocks.
- Syntax and syntax error highlighting for ShaderLab syntax.
- Color Assistance:
- JetBrains Rider provides simple completion based on words found in the current file.
- Brace matching and highlighting, comment/uncomment (Ctrl+Alt+/), and to-do explorer support.
- Code folding.
- [Cg/HLSL] Syntax highlighting for
- [Cg/HLSL] Simple word based completion in Cg/HLSL blocks.
- JetBrains Rider offers a number of file templates for new C# script, tests, and shader files: