Showing posts with label JetBrains. Show all posts
Showing posts with label JetBrains. Show all posts

Wednesday, May 24, 2017

Using the Rider IDE with Unity

Hey Everyone,

Recently I've been seeing a lot more mention of a new IDE called Rider by JetBrains, it's primarily a .NET C# oriented IDE which has already turned towards Unity with integration in mind—but offers a host of other language support (mostly web) on multiple platforms—definitely worth a look-at. Usually I've always used VSCode and the dotBunny VSCode Plugin for integrating with Unity as an external tool.

VSCode in action.
This week though I've been using Rider and its ReSharper Plugin for Unity...

Note: the Resharper plugin is offered directly through Rider during the installation process; something I always love with any software.

...along with the Unity3dRider Plugin. The integration went easy and I might say was a bit easier than VSCode's process. It's been refreshing and offers a ton of great features in regard to working within Unity. Definitely read through the feature list of the Resharper plugin, to highlight a few I'll copy/pasta from their ReadMe some features that made me initially interested.
  • The plugin knows about all Unity based classes (MonoBehaviour, ScriptableObject, EditorWindow, etc.) and their event functions via analysis of the Unity API surface and documentation.
  • Support for Unity API versions 5.0 - 5.6, as well as 2017.1.
  • 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.
  •  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.
  •  Inspection and Quick Fix to use CompareTag instead of string comparison.
  • Tons more!

Installing Rider

Installation was quick and well-documented. First thing was to download the Early Access Program's latest build of Rider, this sound like you have to sign up for something but it's a no sign-up free download. Next go through the typical installation process—for me this was on a mac as mentioned above, so I'm basically dragging an icon into ~/Applications/... 

Don't sweat the Import dialog you'll be prompted with when opening Rider for the first time, just let it do it's default thing unless you already have installed Rider previously.

Make sure to configure Rider how you want it, JetBrains has offered a very friendly and straight-forward way of doing this right off the bat with a string of questions ranging from UI/UX options and framework/plugin options.

Most importantly, ensure you have installed the Resharper for Unity framework during the last stage of installation, you'll need this later. 

Integrating Rider with Unity

If you've gone through the integration process for VSCode via the Asset Store, then you'll soon recognize this is basically the same, minus the easy-access of the Asset Store import process—which is only a matter of time until Rider is offered as well. The Unity3dRider Git page has a great breakdown of the process, so I'd only be regurgitating their process. But a quick few screenshots couldn't hurt if you're stuck looking for something.



First head to your Preferences for Unity...








Open Preferences and navigate to the 'External Tools' tab on the left-hand side, find the 'External Script Editor' drop-down and select the Rider.app from your Applications directory from earlier...

Note: As of this post, this will be listed as 'Rider - EAP'.

Next, import the 'Plugins' folder from the Unity3DRider repo into your Unity project, I just downloaded the zip, copied the 'Plugins' folder into my Unity Project list and let it import...








When all is said and done, you should have the very familiar (if you've been using VSCode) 'Assets->Open C# Project in Rider' option now listed in your 'Assets' drop-down in Unity...



Click it and it should bring you into Rider, load the solution and viola—you're done!










Enjoy Rider! Or hey, stick with VSCode—they're both great solutions for C# development in Unity.
 
Imho...
Rider is a little easier to install as it relies slightly less on other plugins within the IDE itself. The installation was easy-going and well documented and the actual environment itself is familiar due to the VSCode style options and hotkey configurations for people porting over from VSC. It looks like it's going to shape up into a formidable IDE to work alongside Unity.

Thanks for reading and Cheers!

Using the Rider IDE with Unity

Hey Everyone, Recently I've been seeing a lot more mention of a new IDE called Rider by JetBrains , it's primarily a .NET C# orie...