Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Unity3D JetBrains Rider cross-platform Integration
moved to https://github.com/JetBrains/Unity3dRider
@van800

This comment has been minimized.

Copy link
Owner Author

@van800 van800 commented May 23, 2016

How to:

  1. Open Unity Edit -> Preferences ->External Tools
  2. Browse -> Select Rider.exe / .lnk or rider.sh or Rider.app depending on the OS
  3. Put the file to Assets\Plugins\Editor
  4. Assets->Open CSharp project

I have tried it in Windows, Ubuntu and MacOs

@van800

This comment has been minimized.

Copy link
Owner Author

@van800 van800 commented May 23, 2016

Known problems:

RIDER-1201 Call Rider with -l commandline arg will not focus on the first time.
RIDER-1202 Exception caused by commandline
"C:\Program Files (x86)\JetBrains\Rider 146.1908\bin\Rider.exe" "C:\Work\UnityTest\New Unity Project\New Unity Project.sln" -l 0 ""
(workarounded) RIDER-1404 Exception There are opened projects, close them before

@johanneskraem3r

This comment has been minimized.

Copy link

@johanneskraem3r johanneskraem3r commented Jun 21, 2016

Any luck with this and the latest rider build (146.2572)?

I'm using this together with the script from the bottom here: https://youtrack.jetbrains.com/issue/RIDER-1141#comment=27-1441550

I used to be able to jump to a line/file e.g. by double clicking on debug output items in the Unity console with this, but with the latest build this stopped working now. ( I'm on windows btw).

@van800

This comment has been minimized.

Copy link
Owner Author

@van800 van800 commented Jun 22, 2016

@johanneskraem3r,
If Unity opens MonoDevelop instead, this might mean that you need to update path to Rider.exe in the Unity Preferences.

@van800

This comment has been minimized.

Copy link
Owner Author

@van800 van800 commented Jun 22, 2016

I have updated the file and integrated the a piece of code from https://github.com/dotBunny/VSCode and script from here https://youtrack.jetbrains.com/issue/RIDER-1141#comment=27-1441550

@van800

This comment has been minimized.

Copy link
Owner Author

@van800 van800 commented Jun 23, 2016

Update - on Windows detects new version of Rider, if the old path doesn't exist.
ToDo:

  1. Investigate, how debugging works. (RIDER-485 Unity Debugging Support for Project Rider, https://github.com/Unity-Technologies/vscode-unity-debug)
  2. Put the plugin to the Asset Store. I tried once, but failed pass thru.
@johanneskraem3r

This comment has been minimized.

Copy link

@johanneskraem3r johanneskraem3r commented Jun 25, 2016

This latest script seems to work*, thanks a lot!

  • except for one thing: Rider seems to choke trying to open the sln file once it's already open.

To make it work, you have to change line 90 to :
string args = string.Format(" -l {2} {0}{3}{0}", "\"", SlnFile, line, completeFilepath);

( You'll have to open the solution manually the first time).

Maybe there's a way to check if the sln is already open and only open it when required?

@johanneskraem3r

This comment has been minimized.

Copy link

@johanneskraem3r johanneskraem3r commented Jun 25, 2016

While we're at it... Know any way to make windows focus on the Rider window after opening the file at a line?
I currently always have to switch to the Rider window via alt-tab.

Thanks again for putting this up. I was wondering, maybe it would make sense to turn this into a repo instead of a gist.

@van800

This comment has been minimized.

Copy link
Owner Author

@van800 van800 commented Jun 27, 2016

@johanneskraem3r,
Thanks for commenting on this.
I was also wondering about moving to repo instead of gist, but what would be the profit?
Opening solution second time is a recent bug in Rider itself, https://youtrack.jetbrains.com/issue/RIDER-1404
I added temporary workaround (check the Process.GetProcessesByName("Rider.exe") and if it is present use your line 90)

One more question, how do you think, will it make sense to put the plugin to https://www.assetstore.unity3d.com?

@van800

This comment has been minimized.

Copy link
Owner Author

@van800 van800 commented Jun 28, 2016

I added the activate window code for Windows. In Linux it was working by itself.

@van800

This comment has been minimized.

Copy link
Owner Author

@van800 van800 commented Jul 7, 2016

A have got a decline response from Unity Asset Store :(
Please suggest, what could have gone wrong? Maybe that's because I used Rider logo?


Thanks very much for your submission to the Asset Store.
'Unity JetBrains Rider Integration' has been declined.
We've reviewed the submission and consistent with the criteria considered in our approval process, we have chosen not to publish this asset. However, we greatly appreciate the time and effort spent in preparing your submission.
Kind regards,
The Asset Store Team


@johanneskraem3r

This comment has been minimized.

Copy link

@johanneskraem3r johanneskraem3r commented Jul 8, 2016

Hi, thanks for your continued efforts!

I'm not an expert for the asset store, not sure.. Maybe send them an email?
I do think it probably makes sense to put in on there, but I have to admit I don't use the Asset store a lot.

A repo would be nice, this way people could fork it, see changes, track progress. Up to you though, this is also great.

@FullStackForger

This comment has been minimized.

Copy link

@FullStackForger FullStackForger commented Jul 14, 2016

@van800 have you tried to talk to Unity support team? They might give you a clue of what was wrong in a submission form.

@FullStackForger

This comment has been minimized.

Copy link

@FullStackForger FullStackForger commented Jul 14, 2016

I am watching jetbrains' project-rider-a-csharp-ide.
What the speaker mentioned is Project Rider is just a codename for the product. It is going to be called something else eventually.
If folks at Unity are aware of that, perhaps that is the reason they didn't accept your plugin @van800.

Also, if you take a look at unity feedback comments here LukaszUnity said:

We will be looking into providing Rider support in the future, once the product is a bit more mature.
There has been another effort to bring IntelliJ IDEA to C# / Unity: https://github.com/consulo/consulo/wiki . I think this project would be a good starting point for anyone who would be interested in adding Unity to support to Rider before Unity starts supporting it natively.

Hope it helps everyone who ventures to your gist.

@van800

This comment has been minimized.

Copy link
Owner Author

@van800 van800 commented Jul 15, 2016

@indieforger Thank you for the ideas.
I think more official Rider name will be set when Rider public EAP will start. So I will try submitting again after that.

Google search led me to amount of people suffering because Unity Asset Store team rejects their assets, and they all get the same message. I have answered the email, but haven't got the answer. Not surprised. I haven't found the support email for the asset store.

Also got this bit of info from https://rider-support.jetbrains.com/hc/en-us/community/posts/207243685-Unity3D-support

One thing to bear in mind before you go too far down the road here -- in the not so distant future, Unity will be replacing their debugger/script execution integration with a REST based API, which might be a little more approachable in terms of doing clean 3rd party integration. See http://blogs.unity3d.com/2015/10/22/monodevelop-roadmap/. This is currently listed as alpha on the roadmap, which means it's being worked on, but there's no scheduled release and it's not available to the general public as yet.

@gaggle

This comment has been minimized.

Copy link

@gaggle gaggle commented Jul 22, 2016

Just wanted to say this fixed the problem I was having of Rider not seeing main-project symbols when editing editor-project files. Thanks!

@ricardoarango

This comment has been minimized.

Copy link

@ricardoarango ricardoarango commented Mar 23, 2017

If you still need to contact Unity about submitting your plugin, you can contact support using this form: https://unity3d.com/contact/get-in-touch

(Ricardo from Unity)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment