Search Unity

Viable C# IDE for Unity Scripts (aka monodevelop sucks)

Discussion in 'Editor & General Support' started by B3aT, Oct 12, 2014.

  1. B3aT

    B3aT

    Joined:
    Feb 12, 2014
    Posts:
    16
    I watched almost all videos Unity 2013 and 2014 videos, is all good, great things will soon to come, nice job.

    But I have a big problem, I cannot be productive/efficient programmer in Unity C# scripts because I do not have a proper IDE.

    1. MonoDevelop is out of the question, is the worst text editor I ever seen, has more bugs, issues, bad UI then Microsoft products (which is hard to do)
    2. Only viable alternative is Visual Studio Pro with VS plugin, and Resharper, there are lots of issues with this option: expensive, only works on Windows, needs > 10gb of HDD space, etc

    So I`m trying to find a cross platform alternative (At least Mac/Windows, good to have Linux).

    3. I`m currently testing Sublime 2&3, is not an IDE but has lots of free packages.
    • pro: very configurable, fast, multiplatform
    • bad: no auto-completion, no live check/linter
    The problem is that I cannot make the auto completion to work (for all project files). This is a major lack so far and a show stopper. Another good thing is this plugin: http://u3d.as/content/sassembla/sublime-socket-asset/4SP at 20$, from what I see is the VSTools for the Sublime, the problem is only on Mac (windows beta).

    4. Xamarin - Is the next (and probably the last) solution I will test, is cross platform and it seems to have powerful c# features.


    This topic has 2 goals
    1. Do you know other monodevelop alternatives?

    2. Suggestion to Unity Team: Use the best editor out there Intellij, and make the Unity Editor, like Google did theirs https://developer.android.com/sdk/installing/studio.html . May David Helguson hear us all !
     
  2. diekeure

    diekeure

    Joined:
    Jan 25, 2013
    Posts:
    221
    To be honest, I think there is no better option than 2. Visual Studio is an extremely good C# editor, certainly with resharper or visual assist. Expensive? That depends on the target platforms, if you want to deploy on windows 8 you'll need it anyway, just as you need xcode to deploy on ipad.
     
    Zaddo67 likes this.
  3. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    +1 Visual Sudio
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    -1 Visual Studio if you're on a Mac, since it doesn't exist there. ;)

    Xamarin's actually a pretty decent IDE these days. I don't know if you can get that integrated with Unity, though. In particular, it's the debugger integration that keeps me using MonoDevelop (which I don't find to be all that buggy, on the Mac at least). Intellisense is pretty important too, otherwise I'd just use TextWrangler or BBEdit.
     
  5. BoaNeo

    BoaNeo

    Joined:
    Feb 21, 2013
    Posts:
    56
    +1 for getting jetbrains to write a Unity IDE - that would rock! I actually wrote jetBrains about it a while back, they didn't dismiss the idea of a Unity IDE, but they didn't provide a release date either ;).

    I use JetBrains tools for native Android/iOS development (IDEA and AppCode) and they are above and beyond all of XCode, VStudio and Eclipse combined (and yes, I've used all of them extensively).

    Mono is probably the worst I've ever had to use, and the debugging never worked for me - Mono crashes so frequently that I found I was wasting more time restarting Unity/Mono than it takes to find bugs the hard way. Maybe I should try Xamarin then? Is lack of debugging the only downside compared to Mono?
     
    slomonostromo and gfoot like this.
  6. jshrek

    jshrek

    Joined:
    Mar 30, 2013
    Posts:
    220
    I love Komodo Edit as an editor, however it does not have auto-complete so makes it not as useful.

    Visual Studio 2015 will cross-platform for windows, mac and linux so this may be a good alternative for us Mac users once it comes out.
     
  7. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I wonder if it would be possible to make a script editor as a Unity editor plug-in? I know, it'd be a big job to do it well, but... well hey, the Unity editor would actually be an IDE then!
     
    slomonostromo likes this.
  8. jshrek

    jshrek

    Joined:
    Mar 30, 2013
    Posts:
    220
  9. BoaNeo

    BoaNeo

    Joined:
    Feb 21, 2013
    Posts:
    56
    Visual Studio 2015 will not have a native OS X version as far as I can tell? Only thing I heard from Microsoft is that you will be able to run it on Azure as a cloud application, but I wouldn't give that a very high chance of being less sluggish than Mono.
     
  10. B3aT

    B3aT

    Joined:
    Feb 12, 2014
    Posts:
    16
    I started using Consulo (a fork of intellij), works ok, I think the debugging is not working yet ( I didn't looked), still is 1000% times better then xamarin /monodevelop.

    https://github.com/consulo/consulo/wiki/Download-links
    Recognizes all the unity libs including the .UI namespace (after you update the plugins).
     
    piranha4D and gfoot like this.
  11. Anozireth

    Anozireth

    Joined:
    Feb 7, 2013
    Posts:
    71
    +1 to Visual Studio on a Mac. I run it in VMWare Fusion and it works great. Run Unity on the OSX side and share the project folder into the VM. Install UnityVS (now Visual Studio Tools for Unity or something like that) to get the VS project files. Can even debug from VS when running in the editor, although it not officially supported and has issues sometimes.

    Best of both worlds, especially if you're doing iOS development. Visual Studio is far and away the best IDE for C# development. The Community edition is free and I think has all the features needed unless you are a bigger shop, in which case you can probably afford Professional.
     
    gfoot likes this.
  12. B3aT

    B3aT

    Joined:
    Feb 12, 2014
    Posts:
    16
  13. VISTALL

    VISTALL

    Joined:
    Oct 22, 2014
    Posts:
    28
    Debugger works but have many issues
     
    piranha4D likes this.
  14. letroll

    letroll

    Joined:
    Sep 10, 2014
    Posts:
    1
    Consulo is just awesome thank you VISTALL !!!
     
  15. BoaNeo

    BoaNeo

    Joined:
    Feb 21, 2013
    Posts:
    56
    Oh heavenly bliss! How did I miss this?

    The last chance of me ever installing Windows again just vanished in a sweet puff of smoke :)

    Thank you!!
     
    slomonostromo likes this.
  16. jshrek

    jshrek

    Joined:
    Mar 30, 2013
    Posts:
    220
    Flipbookee and slomonostromo like this.
  17. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    369
    Every time I get the "monodevelop suck itch" I've been looking at sublime with the "Omnisharp" plugin, which gives code completion. "Visual Studio Code" starts also to look interesting works with omnisharp too.
     
  18. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I've been pretty content with MonoDevelop, but Si3 does look pretty awesome, so I've just bought it. If it's half as good as its users say, I think it'll be money well spent!
     
    Flipbookee likes this.
  19. BoaNeo

    BoaNeo

    Joined:
    Feb 21, 2013
    Posts:
    56
    I've been using Consulo now for the past week and it is certainly a step in the right direction, but it's not IDEA by a long shot, so don't get your hopes up.

    I'm not sure what the difference is, but I imagine JetBrains won't give away all their gold nuggets for free ;).

    Some of the things I've noticed is that the basic text editor is slower than IDEA and has many of the same annoying pauses and lockups as Mono does (I never have this problem in IDEA or AppCode), and Consulo frequently messes up its index and refuses to re-index, so the code ends up littered with red markings even though the code compiles just fine in Unity.

    Auto-fix is nowhere near as elegant and accurate as the one in IDEA and because indexing is not working 100%, you can't really rely on large-scale refactoring and usage searches (It's kind of like refactoring in XCode where it asks you to do a backup first - it just doesn't inspire a lot of confidence).

    It's a valiant effort and I'm impressed it works as well as it does (and I'll keep using it because it's still better than MonoCrap), but for $225/month I don't think it's unreasonable to expect something better from Unity.

    Seriously, just put Consulo on the payroll and give the guy some decent support and hooks into the UnityEditor and you'll have fixed this in no time.
     
  20. Ironmax

    Ironmax

    Joined:
    May 12, 2015
    Posts:
    890
    Did you try Notepad ? / Sarcasm off
     
  21. VISTALL

    VISTALL

    Joined:
    Oct 22, 2014
    Posts:
    28

    Hi. Thanks for comment.

    About index errors - if u got it, give me it(via email maybe)

    Consulo have own C# implementation and it not very improved like Java impl. Its buggy and very "memory" expensive.
    You can improve it - via sending issues with problem(and short example). Current problems you can read here https://github.com/consulo/consulo-csharp/issues

    Regards, Valeriy
     
  22. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    Resharper's worth it.

    I mean, if you were writing Java you'd laugh at having to pay $250 for a plugin to make your IDE functional, but I've not seen anything at the same level as VS+Resharper in C# land.

    You'd also be laughing at a IDE that's a 10gb minimum install. Microsoft seems to be trying to restart from scratch with Code, but if I come back in 5 years and Code is a 30gb install that can't refactor, I'd not be supprised.
     
  23. CherryEngine

    CherryEngine

    Joined:
    Sep 10, 2015
    Posts:
    19
  24. jk34594345

    jk34594345

    Joined:
    Aug 15, 2015
    Posts:
    9
    You can actually use Rider with Unity already. If you just use it as an editor ( and not for debugging / compiling ), it works pretty well already.

    What works:
    - Opening the unity project ( Open Unity.sln as a new project )
    - Compile time code checks ( e.g. change some code and get errors on invalid code)
    - Clicking on an error/c# file etc in unity and open that file in Rider and move to the correct line in the file.

    What doesn't work / sort of works / might work:
    - Debugging
    - Building in Rider will full errors in the IDE

    Even with the things that don't work it's already my favorite IDE. It does what ReSharper does and it's faster than Visual Studio.
     
  25. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    A other upside to it as well is that many people know its plugin api, since it is the same as all other jetbrains ides like intellij and pycharm. So when it becomes more final i definitely see myself writing unity plugins for it.
     
  26. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,536
    Free Visual Studio with ReSharper. Best you can get for the cost IMO - ReSharper is an amazing tool.
     
  27. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Sign up for Bizspark and you can get all the Microsoft stuff for free for a few years. I'm using Visual Studio Ultimate and didn't pay a dime for it.

    https://www.microsoft.com/bizspark
     
  28. augustinus

    augustinus

    Joined:
    Feb 3, 2015
    Posts:
    25
    In mac, Sticking with monodevelop is the best I think. Visual Studio Code, Sublime text all every other IDEs are lack of something in developing Unity stuff.
     
  29. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    369
    I thought so too until I tried "Consulo"...it is a full blown IDE...that does what monodevelop do and more... :)
     
  30. Robert-HGG

    Robert-HGG

    Joined:
    May 27, 2015
    Posts:
    10
  31. Nikussan

    Nikussan

    Joined:
    Jan 23, 2014
    Posts:
    5
    On Windows I use Visual Studio Community Edition (which is free Pro for small teams), on Mac I use Visual Studio Code, since it have context help / code completion and debug linkage with Unity.
     
  32. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    369
    Yeah Rider seems promising, although I guess it will be paid in the end which might make it a show stopper for casual users.

    Consulo is also based on IntelliJ just like Rider, but Consulo is free and in addition to debugging.. it already has some other nice unity integrations like this:

    You can see which unity files references your classes, and also navigate to them directly from the IDE

     
    Flipbookee likes this.
  33. neoRiley

    neoRiley

    Joined:
    Dec 12, 2008
    Posts:
    162
    I couldn't agree more - I tried the sublime text plugins etc (love sublime btw), but that didn't work - OminServer was never running, slowed things down, sucked. Script Editor 3 has been awesome so far. Love it!
     
    JoeStrout and Flipbookee like this.
  34. piranha4D

    piranha4D

    Joined:
    Jul 20, 2016
    Posts:
    2
    Thanks much for the recommendation of Consulo; since I'm used to IDEA this is a lifesaver, especially since Mono is still b0rked on a Mac case-sensitive file system, and I wasn't looking forward to returning to a text editor. VISTALL, since you seem to be the guy doing all the work on Consulo, you have my deep appreciation.
     
    sfjohansson likes this.
  35. VISTALL

    VISTALL

    Joined:
    Oct 22, 2014
    Posts:
    28
    Thanks. If you found some repository - please report me :)
     
  36. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    Yeah started using this more since my laptop doesn't have enough ram to run a Windows VM and Visual Studio like i do on my desktop. I have actually really been liking it its a very competent IDE for C# work and is instantly familiar to me as well. Since for Java and Python work i already use Intellij and PyCharm.

    I wish it supported the native Intellij plugins but you did a good job at getting the more popular ones included such as ideaVIM.
     
  37. karelium

    karelium

    Joined:
    Oct 11, 2014
    Posts:
    5
    Guys, forget about any alternative other than Consulo, that one is THE tool !!
    It does the debug, auto-complete, syntax highlighting, and intelli-sense stuff like detecting unused imports, variables and such. It looks really similar to JetBrain tools,

    I'm not sure if they took any open source code from them or just built it from scratch putting effort on getting something verrryyy JetBrain's-alike. Either way, it's awesome.

    I switched right away to it and not planning moving back to MonoDevelop so far.

    (I'm on a MacBook Pro, not Windows)
     
    Last edited: Jan 9, 2017
  38. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I'm on a Mac too... but since I've started using ScriptInspector3, my desire for anything else has evaporated. It does all the intellisense, indenting, multi-file search & replace, etc., and it's so fast it's freaky. You double-click something and boom! There it is.

    The only thing it doesn't do is debugging, because it runs within Unity (as does your game), and apparently it's hard for a process to debug itself. So, maybe it'd be worth keeping Consulo around for that.
     
    Flipbookee likes this.
  39. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683
  40. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    its still in its early access program, but the last few versions of Rider are looking great for unity work. It has a unity plugin, as well as an asset post processor on the unity side for good integration. Those who are familiar with resharper in Visual Studio looking for a mac alternative may like it, was well as people familiar with other jetbrains ides such as intellij or pycharm.
     
    MechEthan and rakkarage like this.
  41. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Last time I tried it, Rider was stopping with its code analysis for scripts longer than 4000 lines. No tooltips, no reference highlighting.,, I didn't check anything more in it as my scripts are often longer than that :p
     
  42. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    Another vote for Rider, it's fantastic. (And currently free while in "EAP")

    Debugging works now, refactoring works.

    Rider EAP download: https://www.jetbrains.com/rider/download/
    Unity-side plugin: https://github.com/JetBrains/Unity3dRider
    Rider-side plugin: https://plugins.jetbrains.com/rider/plugin/9219-unity-support

    Only downside is periodically I have to restart Rider (once every ~3-6 hours?) because its code analysis stops working and find-by-reference fails, or I get erroneous build errors about missing references.

    (PS - Definitely DO take the time to rebind shortcuts to what you're familiar with.)

    @Flipbookee Maybe I'm encountering the same issue as you did, but restarting Rider fixes. Although, my longest file is 1500 lines... 4000 seems unwieldy!
     
  43. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    I've been trying Rider over the weekend, and it's pretty great.

    There's some downsides compared to VS+Resharper - primarilly having to restart every once in a couple of hours. Double clicking things in the console makes Rider jump to the correct line, but it doesn't give focus to ride, so I have to manually alt+tab over.

    The big upside to Rider compared to VS+Resharper is that start up time is about 1/10th. It also allows you to navigate around and write code before the solution's fully analyzed, where the VS solution hangs. I'll probably be going Rider full time for our next project.
     
    freedomize likes this.
  44. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    yeah i gave it a go at the Global Game Jam, since my macbook cant handle a windows VM just for the purpose of VS and resharper as well. Was pretty impressed with that state or Rider EAP considering last time a tried few months ago i felt it was useable for getting any real work done. But this current version is very stable and gives me much of what i wanted from resharper and a jetbrains ide but running native on macOS.

    Im sure the issue with it not getting focused after clicking a error in unity will be fixed before it leaves the EAP, as well as sometimes needing a restart to getting analysis working. Since the unity support seems pretty solid i really hope they get good support for Xamarin projects in the future and this application should really ease devlopment of .net core, unity xamarin and mono applications on macOS and Linux and offer a leaner and faster application to work with on the windows side of things.
     
  45. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    seems like your doing it wrong at that point, 1 class should never be that long.

    but if Rider works just like the other JetBrains ide's i know how to fix that issue. Beside the applications executable there is a file named "idea.properties" it should have a line called "idea.max.intellisense.filesize" just set that to a larger value, i believe it has a default value of 2500, so you could maybe it up to be of a larger filesize.
     
    Flipbookee likes this.
  46. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Well, I didn't say it was only one class in that file. ;) There's a script in Si3 with about 20 different classes, all part of the same class hierarchy, all doing very similar job but slightly different in each class. I kind of liked it how all related classes are in the same file there so I can have a nice overview in a single place of everything they do...

    There is also a script in Si3 with only one class with basically one huge method, the one that defines all the C# grammar rules. The definition of a grammar rule takes something like 5 lines of code in average, but there are about 400 rules, so that alone makes that single method 2000 lines long. :p Note that there's really no point of splitting that method to multiple methods as that wouldn't make any sense. Those 5 lines in average per rule are essentially a single line of code calling the AddRule() method, but the arguments are quite long expressions of rule definition symbols, so I have to split them up in multiple lines for better clarity.

    Another reason for making some of the Si3 scripts so long is because they were all written using Si3 itself, so they also serve as stress tests for checking performance and memory requirements. That way I had to make sure Si3 can nicely handle very large scripts without any issues. :cool:
     
  47. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    @Flipbookee does increasing the value of the "idea.max.intellisense.filesize" help this for you?
     
  48. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    Well, I don't know, I'll have to check that. But the idea of using an IDE that has a limit on filesize it can work with is really weird, and I suspect very wrong. I understand it's an easy way to ensure high performance by introducing such a limitation, and in fact it's mandatory for an IDE which is not envisioned as a limitless editor that can handle anything regardless of file size. That makes it much easier for implementing it as they don't have to deal with complexities of limitless algorithms as in Si3. ;)

    I'm not using Rider and I don't really plan to since I have Si3 :p and I'm sorry if this all sounds like self-promotion, but the fact is that Rider is not powerful enough to anyhow dethrone Si3 from its position of the fastest code editor for Unity at least for now in this EAP stage for Rider, and that's what I wanted to find out by trying it out. I often say Si3 is the fastest (even unbeatably fast) C# editor for Unity, so when I do that I want to say that without any doubts. ;)

    Now don't get me wrong, there are things which sound incredibly useful in Rider too, especially when intellisense works in it, so yeah, it's probably a nice option for people who don't mind restarting it once in a while or have extra time for waiting for it to open up (dammit, I couldn't resist :p scratch that) keep their script files reasonably long.
     
  49. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    the limitation can be removed or set to such a high value it wont matter, i would assume it is there for use on systems with low amounts of ram. But yeah the default value is pretty dam small i tend to up it to 64mb in most JetBrains IDE's since sometimes when working languages with stub files it will exceed the limit.
     
    Flipbookee likes this.
  50. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,798
    I'll definitely try that and give Rider another go.
    Thanks for the tip! :)