.NET Tools

Sirenix’s Odin Inspector Support Comes to Rider, a JetBrains IDE

Join us Tuesday, June 4, 2024, at 2:00 pm UTC (check other timezones) for a free livestream, An Eye For Success With Odin Inspector and JetBrains Rider, with Antonio Antunes from Sirenix and Matt Ellis from JetBrains. You can attend the webinar on YouTube or register to get a reminder closer to the date.

We’re very excited to announce that we’re partnering with Unity developer Sirenix to bring support for Odin Inspector to Rider, continuing our work to make Rider the ultimate IDE for game developers. In the last five years, Rider has become a highly popular and widely used tool for Unity scripting, and game development in general – Rider supports Unreal Engine, Godot and Unity, with a recent survey showing that 66% of Unity respondents consider Rider to be the best choice for Unity development. Never one to rest on our laurels, we knew we could help Unity developers further by adding support for one of Unity’s most popular plugins.

Partnership with Sirenix

Sirenix’s Odin Inspector and Serializer is a five-star plugin and one of the most popular enhancements for Unity. JetBrains has now partnered with Sirenix, the company behind Odin, to deliver a productivity boosting toolset for Unity developers.

“Odin Inspector is a plugin for Unity that lets you enjoy all the workflow benefits of having a powerful, customized, and user-friendly editor, without ever having to write a single line of custom editor code”. ©

odininspector.com

We met Odin’s team at the Unite conference in Amsterdam in November 2023 and were excited to discuss their team’s feedback on Rider and brainstorm ideas for technical collaboration.

The first preview of Odin-specific support in Rider was shared to a small group of game developers who already enjoy using both products in their workflows. The feedback we received was extremely encouraging!

“Odin is an essential part of every Unity project I’m working on, so having first-class support in my favorite IDE makes me really happy. I’m excited to see this released to everyone – I bet this will make a lot of Unity developers happy!

My favorite part is definitely group attribute code completion. I can’t count the number of times I fumbled with the group attribute arguments and had to go back and forth between the editor and code to test my changes. With code completion for these attributes, I can build really complex groups quickly and error-free”.

Artyom Zuev, Lead Programmer, Brace Yourself Games

Now, we are announcing Odin support in the public Rider 2024.1 builds for everyone to try!

Support for Odin specifics in Rider

Don’t have Odin or not sure if you want to purchase it, not to worry, they have a 90 day free trial available here so you can try it out.

Odin serialization

For a long time, Rider has understood Unity’s serialized fields in your code. A special code vision next to the declaration helps ensure that the field is serialized by Unity. These fields are treated in a special way in Rider. For example, renaming also adds the FormerlySerializedAs attribute.

Rider now recognizes fields serialized by Odin. There’s a special Code Vision link that helps you understand whether a field is serialized by Odin, by Unity, or not serialized at all. It is similar to the overview provided by Odin’s Serialization Debugger editor window, but now it is right inside your editor.

Odin serialized fields are also handled in a special way. Rider now avoids reporting false warnings such as unused fields and values that were never assigned.

Code analysis and code completion for grouping attributes

Grouping attributes significantly enhance the process of creating and organizing the in-editor UI. Now, Rider also understands the domain of grouping attributes. When you are writing a new grouping attribute, Rider provides you with group path code completion. This speeds up your work and helps you get an overview of the defined groups.

We’ve also introduced new inspections to catch bugs before you switch to the Unity Editor and open Inspector:

  1. Rider will now warn you if you add an element to a nonexistent group while typing in the editor. This feature is also beneficial when restructuring groups, as it prevents the accidental placement of elements in nonexistent groups.
  2. Rider will also alert you if different groups share similar paths.
  3. If an item is included in multiple groups, Rider will warn you about that as well.

Color picker for Odin color attributes

Rider now recognizes Odin color attributes and displays the color directly in the editor. You no longer need to remember the meaning of color constants. Additionally, you can select a color from Rider’s Choose Color dialog, and your code will be updated accordingly.

Resolving C# members in Odin attributes

We have gone through the list of Odin’s attributes, and Rider now correctly handles string literals which start with a `$` sign and special attributes where you don’t need to use the `$` sign. Rider now provides code completion for your members in such attributes, handles rename operations, and allows you to perform Go to Declaration from string literals.

We also plan to offer support for C# expressions inside Odin attributes.

Miscellaneous

Odin has lots of helpful attributes for game development. After inspecting Odin attributes, we have added the following valuable features to Rider:

  1. Code completion for validation attributes (for example, with FilePathAttribute).
  2. Rider is now capable of analyzing integer values based on its understanding of Odin range attributes.

Ready to give it a try? Download a free trial of JetBrains Rider 2024.1.

image description