Hello! I'm Tom. I designed a game called Gunpoint, about rewiring things and punching people, and now I'm working on a new one called Heat Signature, about sneaking aboard randomly generated spaceships. Here's some more info on all the games I've worked on, here's the podcast I do, here are the videos I make on YouTube, here are some of the articles I wrote for PC Gamer, and here are two short stories I wrote for the Machine of Death collections.
Pentadact: Heh. Yeah, it’s awkward because if you hated...
Pentadact: Dunno, that’d be up to the publisher Devolver...
ToastyKen: This actually reminds me a bit of Jason...
My day job is now trying to fix things in Gunpoint and writing e-mails, both of which I’m pretty bad at, so in my spare time I’ve been learning Unity. Not making anything in particular yet, just following tutorials – my test project above has been charitably described by my friends as Thomas Was At Gunpoint.
I have a question, for anyone who uses Unity. I’m looking for a code editor that at the very least:
- Will make auto-complete suggestions as I type for Unity-specific functions
– And show info on what parameters they take once I’ve typed them
– Works on OSX
- Colours recognised Unity terms differently to, say, my own variables
– Makes autocomplete suggestions for my own variable names
– Works on Windows
To illustrate, here’s what I’ve tried so far and why it’s not ideal:
- As I type ‘Destroy’, a standard Unity function, no autocomplete suggestions come up.
– Once I’ve typed ‘Destroy(‘ it recognises the function and pops up telling me what parameters it needs – ideal.
– But even then, it doesn’t colour the word ‘Destroy’ differently to show it recognises it, making code less readable.
– It does offer autocomplete suggestions for custom variables – ideal.
- As I type ‘Destroy’, autocomplete pops up and suggests the full function name – ideal.
– But if I type ‘gameObject’, autocomplete pops up, the first suggestion is ‘Game’, and it CHANGES the case of what I’ve written to match that, even if I don’t select anything from autocomplete. This actually breaks my code. What the fuck.
– Once I’ve typed ‘Destroy(‘ it doesn’t pop up with any help about what kind of parameters this function takes.
– It doesn’t offer autocomplete suggestions for custom variable names.
- As I type ‘Destroy’, no suggestions come up.
– Once I’ve typed ‘Destroy’, it recognises it and gives it a special colour – ideal.
– Once I’ve typed ‘Destroy(‘, it doesn’t give any info on what parameters it takes.
– As I type one of my own custom variable names, it suggests that – ideal.
Any help much appreciated in the comments or on Twitter.
Dean Coakley: Eclipse is fantastic.
A) it makes your job harder to learn.
E) It's a better language
For the IDE you will want to use visual studio, it's by far the best IDE around, and it fits quite nicely with unity, that being said you will end up going back to monodevelop when you want to debug since it allows you to pause the code, go line by line and so on, while visual studio doesn't allow that by default.
As for the version of visual studio you can use the express version but it won't allow you to automatically jump into the code, what I mean by this is that if your code throws an error in unity you won't be able to just press that line and automatically launch the visual studio, open the class where the code is, and go to the line where the error is. To accomplish this you will need visual studio ultimate, although I believe if you have visual studio express already opened, it will go to the code line for you (might be wrong, never really used visual studio express).
If you end up buying visual studio ultimate (or even if you end up using express), please try the 2010 version as well, since in my opinion and in a lot of other people opinions the color scheme in the 2010 is much nicer to work with, so it will definitely be worth trying before buying.
Now for some useful resources:
https://www.google.com/cse/home?cx=001712401338047450041:csfhqk-trfa <- this is the most useful link you will ever have while using unity, you will use it constantly, if you need to know something type what you want to know and you will get search results with stuff only related to unity, trust me it's no exageration when I say you will use it constantly.
http://docs.unity3d.... ...index.html unity documentation, you will also use that a lot, it's the MSDN of unity, it's extremely well documented, and it will tell you everything you need to know about the classes and methods that come with unity, you can also just use the previous link, since it will end up taking you to the appropriate link anyway.
http://blogs.unity3d.com/ unity blog not necessary to develop, but many times they end up showing tricks, or information about upcoming versions and stuff like that.
if you need any more help just reply here or hit me on my email which is micaelmor (it's a gmail email, I just don't type the rest because of web crawlers)
P.S. The reason why it doesn't show autocompletion on destroy() might be because you are not trying to use that method inside Update(), or Start(), or LateUpdate() or one of the different places where unity executes your Code.
Evan Stallings: I already replied via Twitter, but I highly (very highly) suggest UnIDE https://www.assetstore.unity3d.com/#/content/6070 for editing code directly inside of Unity. It works *almost* perfectly (it is still being updated), it increases efficiency, and it is very simple to use (not slow and bloated like I feel MonoDevelop is).
It is worth a look-see, the demo is free in the Asset Store. I suggest Googling it or searching in the store.
Awesome that you are learning Unity! Get UnIDE and you will be set! Have fun! I love Unity...
Micael: Oh I skipped one of the requisites which is working for OSX, which visual studio doesn't do (to the best of my knowledge), so yeah you will have to go with monodevelop, there are other options like eclipse which is a very used IDE for java, but honestly I doubt it's worth using it.
As for the suggestion of Evan, it's nice but I don't think it's a replacement for an IDE, also since money isn't that much of an objection, I would strongly advise you buy a second monitor, it pays for itself since it improves your workflow a lot.
Oli: Have you considered using Vim? Bit of a steep learning curve, but any program that is still this popular amongst pro devs after more than 20 years is surely doing something right!
You will need to customise it to get it working how you like with Unity but a quick Google search should sort you out...
You could also try Textmate, although the Unity module for that looks a little stale.
Note: I myself have only dabbled with Unity, so take that with a pinch of salt.
Ninja Foodstuff: Also if you do find something that ticks all the boxes, please let us know.
Jason L: BBedit is widely recommended for its insane highlighting and hinting on Mac, and you may overlook it because its marketing is primarily oriented toward web development. I checked - it does have a Unity3D plugin, and some Unity developers do use it.
If it were me, I'd try to hack up Vim since you get lots of bizarre powers and cross-platform functionality for free, and for better or worse these days they've increasingly abandoned the modal interface paradigm. Note that I do not claim I would ever get productive. It looks like you would want a Unity and C# combined .vim for the powerful custom highlighting half and one of a variety of tools with ctags for the function 'prototypes'/'hinting' half.
Overall Intro: http://vim.wikia.com... ...ike_an_IDE (and See Alsos under Code Browsing)
Ctags Howto: http://www.thegeekst... ...e-browser/
Or assuming you don't care about language anostism, Clang-complete for C#: http://stackoverflow... ...ints-for-c
Highlighting customisation: http://stackoverflow... ...ing-in-vim
Looking at the list of request, most IDE's will do what he requires by default, the biggest problem and something that is not going to come by default is "Colours recognised Unity terms differently to, say, my own variables" which I assume he doesn't mean just differentiating between unity methods from his variables, but also differentiate unity methods from his own methods.
I also see them as somewhat of a non problem mostly because from a programming standpoint it doesn't really add much to make such a distinction, it's all objects and they are used in the same way that user made methods are, and differentiating between variables and methods is done by the c# semantic and code organization.
BTW forgot to say in my initial post, but not sure if game maker allowed OOP, if it doesn't, and you don't really know about it, you should probably learn it, a good C# book that might help (it's not unity related, but most of the information translates) is head first c#.
Evan Stallings: Micael, I would be surprised if he does not have a second monitor! Haha! (He might not though, maybe you have information I do not.) Anyway, though UnIDE is still in development and very simple, I see no need for an external "IDE" if you are working with Unity. Personally, working with Unity, I do not need much out of IDEs. I think that is why so many people use simple text editors... Every one to their own I suppose! UnIDE is great but simple. For external IDEs I suggest Sublime Text. It is not for everyone but many like it.
Micael: I'm not sure if he has one or not, but he posted some images of his house when he got robbed, and I don't remember seeing two monitors, then again I remember seeing him use a television as a monitor, so technically to the best of my knowledge he had none XD.
Well you don't need an external IDE, but depending on how you work, it can be very useful, since they usually offer a bunch of tools that help like code refactoring, code analysis, XML autocompletion for methods (and similar stuff), class outliner, and the most important thing (although without addons is only available in monodevelop) proper debugging.
I should probably mention that I have never used UnIDE, so the features I know are the ones I saw, it might have more and so on, and in my case I spend a lot more time refactoring, thinking on how to implement code, testing and so on, than I do actually writing it, so those features end up being more important to the way I do things, but I can definitely see how something like UnIDE can be useful, especially to quickly write something.
BTW I feel that someone should mention in case that it isn't obvious by now, that IDEs are very much one of those things that also ends up depending heavily on user preferences.
P.S. Does anyone here use monodevelop frequently? I only use it for debugging, is it really that awful performance wise? I mean I know it had stupid stuff like it becoming very slow if you had a search on, but how slow is it these days on a nice machine (quad core, SSD, and so on)?
Jason L: I forgot to include, then meant to add before I passed out last night, that Cream is a Vim with the modal interface tucked away.
Chris: I'm not sure how deep your Sublime knowledge is, but you can get a lot of extra mileage from its plugin system.
This link (note: apologies in advance, I only googled for sublime and unity, so you may have already checked this out and found it wanting, and I'm not 100% it'll cover what you need. For instance, the auto-complete for common Unity classes and functions seem a little light. Also, as Sublime is in the main just a very advanced text editor, it'll probably have difficultly figuring out which functions and variables any given instance will have access to) lists a Unity 3D plugin for Sublime.
Evan Stallings: Micael, I use UnIDE as I have said, but if I must use something else, I usually use MonoDevelop because it came with Unity and is free... Haha!
tilde: As said higher ( and to my knowledge ) MonoDevelop is the only IDE that allow you to debug Unity code ( by setting breakpoints, stepping, adding watch ... ). There is one plugin for Visual Studio that does it too ( but require a visual studio pro licence, the plugin is not free, and only Windows ).
For the auto-completion both Visual Studio and MonoDevelop show me "Destroy" if I start typing "Des" ( on windows ). Again as said higher in the comments, auto-completion is context sensitive which means that the IDE will not show Destroy if it "doesn't exist in the class context" ( in this case to use Destroy, the class must be a child of MonoBehavior ).
The shortcut "ctrl + space" forces auto-completion to happen.
And I also recommend using C#.
YetiSeekingYeti: Haha, I'm sort of new to Unity and my first thought when reading this was;
Thank you, the comments, for immediately and repeatedly reassuring me.
RC-1290: Now that you're using C#, something that might also help is the tripple forward slash (///). It creates a comment block that will be used by MonoDevelop to show extra info in the info box.
You can also use it to generate documentation using a tool like Sandcastle Help File builder, although that's a bit awkward to use.
sharkyx: You can also get Xamarin Studio, which is the most current version of MonoDevelop. The Monodevelop delivered with Unity with very very old. It has less bugs, better code completion, better syntax coloring, less bugs and less bugs. Also, since a few days, you can install a Unity Debug plugin from the Add-In manager (after you activated the add-in alpha channel repository).
WIll Goldstone: Hi Tom, really looking forward to what you come up with in Unity after the success of Gunpoint! I run the Learning team at Unity, so if you need a hand with anything feel free to give me a shout either via mail on will at unity3d dot com or on twitter @willgoldstone.
All the best, and glad to hear you jumped to C#... so much better ;)