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 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.
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!

Saturday, May 20, 2017

Quick Update

Hey All,

Quick shot of the latest Audio Explorer sans TreeView
Just dropping in for a quick update, I'm still working on the Explorer Tools but with not much to say other than I've been reading up on Unity's TreeViews for making the tools look a little better and be as up-to-date with how Unity is handling these types of tools for a more recognizable UX. After that I can go on with the rest of the planned tools. I've also been looking at Valve's Phonon Spatial Audio solution, or Steam Audio as it is also called and possibly looking at extending the Audio Explorer I've already written to support Phonon build support.

As of now Phonon takes a bit of setting up in a scene. AudioSources, Geometry and other objects need to have their proper components in place before a proper Phonon build can be made.

  • On a side-note I think it's interesting how Audio has followed suit with Materials, in terms of PBR, what does anyone reading think the next area of physics based improvements will be made as far as immersive elements in games?

The solution would look to see if Phonon was installed and if so, flag each AudioSource not properly configured for Phonon. As far as geometry, it's a little trickier—what does the designer want to be registered as having both Phonon Geometry and Phonon Material components—and what does she not? The only thing that comes to mind now is enforcing grouping habits with null game objects. The null object would have a component called 'LevelGeometry' containing the necessary information in that class to setup Phonon on each piece under that parent object while also being able to be checked in an Explorer Tool Editor Window—the tools could also possibly just search for Phonon Gemeometry components being used as parent components and work in that fashion.

So the big idea being the Audio Explorer having a kind of validation method for Phonon related components in the game world. Check back soon as I'm very interested in exploring this, but I also want to continue finishing the Book of Shadows for Zen to get a game-play video out as soon as possible. Thanks for reading!

*Oh, and I've also recently written a new Portfolio and I'd love to share it to anyone reading.

Wednesday, May 3, 2017

Explorer Tools Update #1

Hello All,

Another quick update here on the Explorer tools I've bee writing for Hexcraft. So far the Audio Explorer does quite a lot of useful things, it can select, focus add or remove components create objects with components and all the basic actions you would want to do when working with audio. I've also added a Listener tab for all listener related actions and searching.

As for the Canvas Explorer I've got basic searching and actions (adding, removing, selection and focus) and want to begin adding tabs for various types of canvas objects to fully be able to explore UI elements within a scene without looking in the Hierarchy for ages or for play-testing (disable upon entering editor mode and enable upon play-mode options)—eventually leading to a possible separate UI editor window, where UI elements are hidden in normal editor mode and revealed in 2D UI edit mode, which should make the UI system play nicely for level designers using ProCore tools or other similar assets.

I'm also expanding the Explorer tools to a Particle Explorer and a eventually a custom Entity Explorer for all Hexcraft related components and prefabs. The updates will come faster as I finish my last week of school here at Cornish and have a little more time available.

Keep posted for some updates and shots of all the Explorer tools and possibly some .gifs of them in action.

Happy Wednesday!

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...