The short answer is that any text editor will work with Unity, and there are lots of options on the Mac. The bad news is that really good C# editors aren’t very common on the Mac, autocomplete seems to be rare on the Mac outside of domain-specific editors (such as Dreamweaver, Coda, Flash, and RealBasic) and that Unity’s slightly odd JavaScript dialect confuses a lot general purpose programmer’s editors.
Here’s a very comprehensive breakdown of editors:
Textmate and BBEdit are both worth a look.
Smultron (which Unitron is based on) and TextWrangler are both free and quite decent.
As I’m still very new to unity, could you tell me how do you guys do some debugging on it? I’ve tried to find about it in the documentation but still haven’t found anything - I still have allot to read.
I think that is the only concern I have left to buy Unity, how to set breakpoints and debug the code…
My first option is Visual Studio under VMWare but I have not memory enough when I am editing a huge level under Unity and using other applications as well, so sometimes I use Komodo Edit and few times TextMate.
thanks guys. I’m assuming that there’s a tutorial/resource on how to acheive the vs debuging? Anyway, I’ll keep searching, at least I know what you’re using, so now I know it’s possible !
Debugging in Unity is … different. There’s no Step/Watch/Trace debugger (I believe it’s a VERY popular request…) but there is:
print(); // puts messages in the console
Debug.Break(); // pauses the runtime
And everything in the IDE is live, so you can pause (or your program can pause) and the scene graph and everything in it (including public script properties) is live.
In some cases, this is better than a Step/Watch/Trace debugger, but in many cases you’ll wish you had a more conventional debugger.
just wondering, i really cant live without vim as ‘ide’, but if i set gvim as editor within unity, gvim immediatly crashes after doubleclicking a script file in unity. gvim/vim works outside of unity. anyone got vim working as unity editor? no matter if gvim or vim via shell?
I use TextMate as well. It would be really awesome if someone wanted to collaborate on implementing code completion in either TextMate or Xcode (I would prefer the latter). It is possible in both cases - its just not a small task.
I don’t think TextMate is “smart enough” to do code completion properly. In essence I think an editor has to be tightly bound to a compiler/interpreter OR effectively have its own compiler/interpreter to work as well as Visual Studio or RealBasic (or Flash, or Director, or …).
Even XCode’s code completion is pretty weak for anything other than Cocoa (e.g. in XCode if I type “document.w” in a JavaScript file it doesn’t offer me anything – offering to finish typing “function” for me is not very useful).
Code completion has been done already with plugins.
Again. Its a case of writing a plugin, but as said it is not a light task. I’m using Xcode for generic C++ projects and getting lovely code completion.