Rider recommended disabling and auto save on focus change for Unity. Good idea because Play Mode saved changes suck. So far so good, seems like they care about my engine of choice. Lovely IDE so far. Let’s make a Rider replica in Unity!♥ Support Brackeys on Patreon: Download the project: https://github.com/Brackeys/Rider-Repl.
What you will get from this page: Tips for editing the code of your Unity projects efficiently with JetBrains Rider. JetBrains Rider is a cross-platform C# script editor with many rich features for Unity developers. Grab this advice, and then get even more guidance in this Unite session by Matt Ellis from JetBrains.
Rider Unity Plugin
Shift+Shift
Use the Shift+Shift shortcut to search for anything in your C# scripts, such as files, classes or symbols. You can type pretty much anything in the search field and Rider will start to present you with choices. You don’t even need to type full words; Rider will recognize initials as well.
Once inside a file, you can use the Navigate to Member action to quickly jump to a method, property or field. Just start typing to narrow down the choices.
Alt+Enter
Alt+Enter gives you a pop-up context menu of actions you can perform at any particular point in your code, including fixing any issues Rider finds while analyzing your code. For example, if you hit Alt+Enter over the name of a class, you will get a list of actions that include fixing naming standards or making the class public.
Or if you have the wrong name for an Invoke method, Rider will warn you up-front and show you code completion suggestions. While you’re still in the Editor, Rider protects you from making changes that would break your code, which you wouldn’t otherwise see until runtime.
Alt+Enter also provides entry points into pretty much all the functionality in Rider. If you can’t remember the keyboard shortcut for something, you can hit Alt+Enter, start typing, and see a list of actions relevant to your input.
You can use the Refactor This function to refactor code, rewrite it, move it to a different file, and safely rename symbols, including all usages in other files.
You can also use Alt+Enter to generate event functions. You can do this anywhere inside a Unity-based class. You’ll get a list of all of the event functions you can create in that particular class.
Rider recognizes when you have an event function, serialized field, or MonoBehaviour class and will highlight it in the code. If you hover over an event function, for example, you’ll get a tooltip with a description of what that event function does. You can type “quick documentation” to get more information in a pop-up window or follow the link to go to the full documentation.
The Navigate to the menu is useful for moving quickly around your Unity code, such as jumping to base or derived classes, as well as finding usages. It can even decompile Unity code on the fly and show you what’s going on inside Unity’s own APIs.
Debugging
The Rider debugger shows extra data for Unity objects. For example, when looking at a Scene in the debugger, you see a list of root GameObjects, and each GameObject shows child GameObjects and attached components. ECS Entity objects also show component data.
Rider includes a code-focused profiler that looks at just your scripts; it doesn't look at any of the other things that are happening inside Unity itself. You can quickly search for types and methods and perform what-if analysis to see if it’s worth optimizing a method.
Scheme switcher
You can use the scheme switcher to change the look and feel of the Rider window and choose a light or dark theme.
This feature is also really useful when you’re pair programming with somebody because you can update things like the keymap as well. If one programmer likes working with one set of keys, while the other one chooses another set, you can very quickly switch between them.
For more guidelines, see the Rider for Unity docs.
Yes!
Rider For Unity Vs Visual Studio
Meh.
Unity3d Rider
The JetBrains Rider editor package integrates support for the JetBrains Rider .NET Integrated Development Environment (IDE), into the Unity Editor. This package provides an end-point for Rider to call different Unity APIs and to generate .csproj and .sln files, which Rider uses to implement support for Unity in its plug-in.
This package ensures that IDE features like autocomplete suggestions and flagging dependency conflicts work in Rider. It uses .cproj and .sln files which store information about your project such as:
- Versioning information
- Build files
- Platform requirements
- Web server or database settings
Not all code in Unity is directly visible to code editors, particularly when using packages. This is because packages don’t provide their own .csproj files, and Unity doesn’t create them for installed packages by default. This means that IDE features like autocomplete suggestions and flagging dependency conflicts do not work with code in these packages. The purpose of this package is to produce the .csproj files that make these features possible by default when you use Rider.
Installation
As of Unity version 2019.2, this package comes as a part of the default Unity installation. If you are updating your project from an older version of Unity, you might need to install this package via the Package Manager.
Requirements
This version of the JetBrains Rider editor package is compatible with the following versions of the Unity Editor:
Rider For Unity
- 2019.2.6 or later
To use this package, you must have the following third-party products installed:
- JetBrains Rider version 2019.3 or newer
For more information about the Rider IDE, see the JetBrains Rider documentation.
Submitting issues
This package is maintained by JetBrains and Unity. Submit issues to the JetBrains/resharper-unity/issues GitHub page. Unity intends for this package to become accessible to the public on GitHub in the future.