Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Using Alternate Code Editors with unity. What works ?

Discussion in 'General Discussion' started by Nanako, Nov 16, 2014.

  1. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    Hi all. I've decided i can't use the built in monodevelop version anymore, because it is broken. Code folding doesn't function properly.

    I'm trying to find some other solution, and my first plan was to update monodevelop. It's at version 5 now, although it's been renamed Xamarin studio.

    I installed it, and set it up as the default code editor. It seemed to function, but not fully, the entire left window was empty, and opening scripts from within unity would create a new xamarin instance/window each time. So i tried using Assets > Sync Monodevelop Project from within the unity editor, and this is the result:



    however, despite that, the left window is populated, and the new-instance-per-script thing was gone. But it had two farther problems:

    1. These errors in the unity console. I have no clue what they mean:

    2. Clicking an error in the console doesn't jump to the appropriate line number in the script that is referenced.

    Sadly it would seem to be unuseable, unless anyone can advise how to fix these issues

    What other alternatives are there? Presently downloading visual studio community 2013 (8 GB download, dear god) and SharpDevelop. Will either of those integrate properly?

    Can Xamarin studio be made to work? I wouldn't mind that at all
     
  2. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    inafield, shkar-noori, Xaron and 6 others like this.
  3. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,797
    You use Windows, why aren't you using Visual Studio??
     
    HeadClot88 and Zeblote like this.
  4. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Visual Studio Community with UnityVS and Resharper.
     
    alexzzzz and HeadClot88 like this.
  5. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    What does resharper do that VS does not just curious here :)
     
  6. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    because, like with many kinds of bundled tools/software, we never realise or consider that there are alternatives, until what we have stops meeting our needs. :p
     
  7. R-Lindsay

    R-Lindsay

    Joined:
    Aug 9, 2014
    Posts:
    287
    Nanako, I can add one more recommendation for Visual Studio. I've been much happier coding in it since switching from Mono.

    As for resharper, it may or may not be essential for you (especially since its paid). Go to their website and click on the video, it will explain "why resharper is awesome".
     
    Meltdown and HeadClot88 like this.
  8. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    Thanks for the info :)

    Might need to pick up re sharper in the future. :)
     
    R-Lindsay likes this.
  9. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,797
    Resharper is amazing.

    They key is to learning all the keyboard shortcuts, and I literally mean go through every shortcut and see what it can do, it will blow your socks off and improve productivity by 30%.
     
    Zeblote likes this.
  10. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    Sounds like a definite buy then :)

    Looks like my savings is going to take a small dip :p
     
    Nanako likes this.
  11. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    Okay here's where i'm at so far,

    I've got VS installed, and the unity tools package, then restarted the unity editor to make the new menu show up. ("Visual Studio Tools")
    . then, from that menu;
    I've selected Open In Visual Studio, that seemed to make everything "boot up" and populate all the fields as appropriate
    I've selected Generate Project files. I don't think that did anything.
    I've gone into configuration and made sure all the boxes are ticked.

    The problem is that some of the behaviours described in those checkboxes, are not functioning properly;

    When i try to open a script from within unity, it doesn't open it in VS. However it does Switch focus to VS, and leave me sitting there staring at whatever script i had open previously.

    When i try to open a console error, it does literally nothing. It's supposed to send me to the appropriate script and line, i'm sure.

    Also, in the unity preferences > External tools, my External script editor seems to have been automatically set to UnityVS.OpenFile
    i assume that's what we want

    Other than these two (pretty darned important) useability issues, there are no other problems that i can see. I'm almost there!

    What could still be wrong? x
     
  12. R-Lindsay

    R-Lindsay

    Joined:
    Aug 9, 2014
    Posts:
    287
    Just to double check that I'm reading you right, your unity preferences looks like this?
    unity preferences.png
     
  13. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Try restarting both unity and VS as a start.

    Is External Script Editor Args (right below External Script Editor) set to "($File)" $(Line) ?
     
  14. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    I agree with VS 2013 CE if you use Windows. Note that the "better compiler" is irrelevant, though, since Unity compiles its own stuff regardless of what text editor you use.
     
    Cogent and Nanako like this.
  15. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    Nope. It looks like this:





    yup, that did it. Seems to be functioning perfectly now. At least i think so.
     
    Cogent and R-Lindsay like this.
  16. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
  17. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    SteveJ likes this.
  18. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    They're different tools for different jobs. The text editor is only one part of the many things VS does. For coding I agree, I wouldn't use a text editor where a good, full-featured IDE was available. But I also have Notepad++ installed, and use that almost every day as well.
     
  19. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683
  20. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    If that works nicely on a Mac and isn't a pain to set up, I am so there...
     
  21. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,952
    Mac: TextMate2
     
  22. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    When I Ctrl+S in MonoDevelop it randomly teleports me to a different section of code... autocomplete and code folding don't work. Really, nothing works. It's the worst environment I've ever worked in. How could something so widely distributed suck so badly?
     
  23. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    Older versions weren't that bad. I've completed huge projects using older versions of MonoDevelop. Sure it's wasn't as nice as other stuff, but it was adequately workable.
     
  24. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    oh this thread is funny. you guys have a great sense of humour
     
  25. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,184
    I'll second Visual Studio. It's the best thing out there for C#. Monodevelop is a piece of garbage

    It's a pity though - coming from the Java world, there's at least three free IDEs that do what Visual Studio and Reshaper does, only open source and free. To get the same quality as Eclipse in Java, the C# world requires you to pay $1500 for a VS license, and 240 Euros for Reshaper.
     
  26. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Baste, you lost all credibility at "Eclipse" which is pretty terrible. :). Now that visual studio community is free, what can you do in the Java IDE's that you can't do in vs? I can certainly think of some nice features visual studio ultimate adds but those are fairly unique to visual studio, like code lens.
     
  27. Dameon_

    Dameon_

    Joined:
    Apr 11, 2014
    Posts:
    542
    Sheesh, modern programmers and their reliance on IDEs. The proper way to do it is with emacs. Or better, vi. Unity integrates beautifully with both.
     
  28. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    You must be a really rapid game developer. Nothing says efficiency like old-fashioned text editors.
     
  29. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,184
    Every single thing in the 12 minute video that shows off Reshaper is default in Eclipse, Intellij, and NetBeans. Method inlining, variable extraction, class extraction, go to member, go to type and go to next/previous compilation error are all examples of things that's just missing that I would use daily if they were around. I haven't seen pull up method (ie. automatically move it to a superclass), nor automatic removal of unused imports.

    Somebody wrote up a pretty lengthy comparison.
     
  30. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    Excuse me, but real programmers use butterflies.
     
  31. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,353
    Does Visual Basic support JavaScript for Unity? Because when I enter code it highlights some errors.

    Also, solution explorer shows only Plugins folder and I can't find a way to show everything in my projects folder. Unity Explorer window has same issues as well.
     
    Last edited: Nov 17, 2014
  32. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,888
    There's always Notepad++. I use it. It's a hindrance sometimes. But at least it loads instantly, pretty much.
     
  33. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Many of the things Resharper does can actually already be accomplished in VS... Resharper just makes it easier and tells you when you should (or it thinks you should) do certain things.

    Your comparison link is also inaccurate. For example, right away the "one debug" vs "one release" configuration example stuck out at me right away. You can create as many build configurations as you want. The code formatting section is also missing tons of stuff (surround with comment for example... Ctrl-K, C or Ctrl-K, U).

    Type Hierarchy... Visual Studio calls it the Class Explorer. Same thing. Same with some of the later comments... losing track of where something is in the hierarchy... there's a shortcut to select the file in the solution explorer. VS 2013 also adds "peek definition" so you don't have to GoTo.. you can show the definition in a modal-esque child window below and continue "peeking" until you find the definition you want, then just hit a button to keep it open.

    I'm sure Eclipse has a lot of nifty features... and I could think of several that VS is lacking but I don't mind using Resharper for those. The point is a bit moot because we're doing C# development for Unity so I'm not really sure where the comparison to developing in Java in Eclipse comes in.

    That being said... last time I tried Eclipse was for Android development and the experience was godawful. Eclipse has horrible UX and isn't a lot of fun to work in. I suppose if you want a free editor for Java it's fine... but for Android development JetBrains (maker of Resharper) also has a product called Android Studio (which Google now recommends) and it's miles above Eclipse for its target market (Android).
     
  34. _met44

    _met44

    Joined:
    Jun 1, 2013
    Posts:
    633
    Good old familly style trolling, I like it ! Reminds me of the first forums in the 56k era :D

    Now let's feed the beast:
    As much as I loved using Emacs (color blind mode, school policy) when I was writting C/C++ on FreeBSD, the point of using Unity nowadays is to get things done quickly by the means of tools that suck up a bunch of tasks for us.

    It seems counter productive to combine it with a text editor of the past millenium instead of a fully featured IDE that would improve productivity even further.

    Only reason I could think of is that you'd like people to learn programming before getting their hands on advanced tools but the way I see it, you're mixing 2 unrelated topics. I would agree in saying that IDE would be put in better use if taken as performance booster rather than as a replacement for knowledge and experience. But saying emacs/vi are the proper way, I call BS.

    Also, It's out of the scope of this topic.
     
  35. Dameon_

    Dameon_

    Joined:
    Apr 11, 2014
    Posts:
    542
    Wow, I didn't think the emacs comment would be taken seriously. Rest assured, I use VS. I like the intellisense. And it integrates nicely with Unity and my version control. It took me about 5 minutes to stop screwing with Mono.
     
  36. _met44

    _met44

    Joined:
    Jun 1, 2013
    Posts:
    633
    What kind of troller doesn't follow up, damn. Anyways, believe it or not, there are some people still stuck with using emacs and VI, I just don't think they use unity :p (they're more of the type to have an openGL book on their desk)
     
  37. Dameon_

    Dameon_

    Joined:
    Apr 11, 2014
    Posts:
    542
    I suck at trolling :(
     
  38. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,447
  39. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,952
    Actually, our engineering lead uses emacs. It's pretty entertaining as he can develop faster than most in a modern gui/te. We exclusively use macs (except the artists, they can use whatever they prefer.) and most use monodevelop or sublime. A few like myself prefer textmate2.
     
    Last edited: Nov 17, 2014
  40. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    why
     
  41. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,952
    Our primary platform is ios, and on the very rare occasion that we need windows for anything we have bootcamp. Also by having the devs all use the same dev platform, we only have to support one configuration, all our tools, scripts etc don't have to be ported to another platform.
     
    angrypenguin and Graham-Dunnett like this.
  42. thxfoo

    thxfoo

    Joined:
    Apr 4, 2014
    Posts:
    515
    Can you do refactoring, GUI design, UML, model based code generation, GIT/HG, different build and test systems fully integrated without spending additional money?

    Open IDE Settings and begin to type what you are looking for. Eclipse will search and show only tabs/settings that match as you type. Same for class view or project view, begin to type and get what you are looking for. In my old VC++ nothing like that available...
    And Eclipse is very customizable for free while most needed VS addons cost money.
    I got a VS ultimate edition and was shocked that it was as sh#tty to use as an express edition, I expected they made the express edition s#ck by purpose so people buy a better one, but no.
    Eclipse can crash, but for me it is much easier to crash VC++ 2010.

    I assume you prefer what you already know better. I have about the same amount of experience in both and would take Eclipse most days. (Eclipse allows me to do stuff like I want, if you try to do stuff in a non MS-way with VS you can be in hell).
    Note: for most stuff I would not use Eclipse (just had to at previous job), but VS drives me crazy, just the way VC++ 2010 express edition lists build warnings and errors has a lot of rage potential.
     
  43. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    Lets be fair, though. You're comparing functionality available for Java to functionality available for C++. Also, how "old" is the VC++ you're talking about?
     
  44. thxfoo

    thxfoo

    Joined:
    Apr 4, 2014
    Posts:
    515
    2010 is my newest (express and ultimate).
    My VS .NET time is longer ago (VS 2003 and 2005). But I assumed the shortcomings except GUI design (and maybe very basic refactoring) are also present in VS 2010 express for .NET, because much of the frontend is the same as VC++.

    Edit: another one is search/replace tools. Yes you can search/replace project wide in VS, but if you are used to do it in Eclipse it looks like a joke. Or diffing files and folders or going back in time (compare to earlier versions of a file).
    Edit2: I also don't like the Eclipse Android integration, but that is not really Eclipse's fault.
     
    Last edited: Nov 18, 2014
  45. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    vs has improved significantly even between 2010 and 2013. I can't speak to c++ as I only use it for .net development and web dev primarily with c#. But the real question is whether eclipse is a viable ide for use with unity. I think the obvious answer is no, and it doesn't even really belong in this discussion since it goes away from the op's question.
     
    angrypenguin likes this.
  46. thxfoo

    thxfoo

    Joined:
    Apr 4, 2014
    Posts:
    515
    [OT]
    I just answered to you when you said:
    Because I have thousands of hours in VS .NET, VC++ and Eclipse, and I don't think Baste loses any credibility, because failing at good search/replace, diffing and history alone make VS kind of a toy (I do all those things with other tools if I work with VS projects, and for me these should be features of an IDE).
    [/OT]
     
  47. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,396
    yeah the free visual studio with the free visual studio for unity plugin work amazing everyone should check it out ive been using it now for like a week and loving it.

    all the little issues that everyone complains about mono develop and that never get fixed are gone and it runs very fast so when you are debugging you dont even know its being runned in debugger cause its so responsive and what else can i say unity should switch to it...
     
    angrypenguin likes this.
  48. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Just an FYI for all of those using Resharper as well. In the Resharper Gallery there is a Unity addin to simplify creating Monobehaviors.
     
    HeadClot88 likes this.
  49. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Oh, there is also a Heap Allocation addin for Resharper. :) It tells you when you're doing naughty things like boxing a value type into type "object".
     
    angrypenguin and alexzzzz like this.
  50. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Do you know if there is an extension to make it stop annoying you about "Update is never used" and things like that (but only in monobehavior classes)?