Autocomplete for Unity JS with FlashDevelop

As we’re getting more of the company up to speed with Unity we decided we should stick to one language. Of course, it makes sense to embrace JavaScript. Up until now I’ve been using C# and editing scripts via Visual Studio. Primarily I chose C# over JS specifically for delicious Intellisense.

Reluctantly I started some learning projects with JavaScript. I really, really like smart autocomplete, though, and missed it in my JS editing, so I decided to do something about it:

http://www.flashbangstudios.com/tests/unity_js_autocomplete/

If anyone actually edits via Windows in their pipeline–or wants to try this via Parallels or whatever–I’d be glad to share the changes I made to FlashDevelop.

Whoa, Matthew, that is awesome.

Very cool Matthew. Another game engine I’ve used (“DX Studio”) has something like this and I find it very useful. I’d love to give this a go with Unity. Sure wish there were a Mac version…

Super Yummy. Unity needs this built in. :stuck_out_tongue:

Hmm, flashDevelop is open source… I wonder how portable it is… revenge, indeed.

(It’s .NET, so if Mono gets up to snuff with the GUI stuff… we COULD get a Mac version eventually. Am I wrong?)

Any screenies? :lol:

? did you miss the video link in the first post ?

Oops, I thought that was a download link, so I didn’t bother clicking :sweat_smile:

The only other app on OSX (aside from Dreamweaver) that does that sort of auotcompletion is skEdit - that I have found and is usable in production. I use it for all my HTML editing which it was originally designed for. However, version 4 coming out later in the year will have custom language support… and believe me I will be customising it to support Unity as soon as it goes final… or when the betas are stable enough for production. :wink:

http://www.skti.org/

However it isn’t free.

Cheers.

Hmm, doesn’t Xcode have similar code completion? Anyways, I’m still keen on Textmate. :smile:

XCode can do that kind of completion for C# scripts. Most programs with C# code completion uses reflection.

FlashDevelop is a parser-based system, though, which meant that I had to convert the stuff from UnityEngine.dll into fake intrinsic classes. It’s hack-tastic!

Cool stuff. I had a similar concept I was toying with once. Stubbing out Unity Classes for autocompletion is the way I was headed. I was also trying to embed the doc as well. That always helps too if your ide has hover doc.

I just updated our intrinsic class creation script to include the one-line note from the documentation:

http://img489.imageshack.us/img489/6241/commentsve1.gif

We generate these files for use with FlashDevelop (Flash-style intrinsic classes):

http://rafb.net/p/rqVMVI69.html

awesome

Excellent! If you don’t mind I would give it a try. Where can I download your modification?

This thread is such a tease :stuck_out_tongue: When can we check it out? I’ve been dying to get this functionality.

I’ll package it up and post a zip sometime this week (little bit busy today). Soon!

Well, bad news for people waiting to try this out–the Unity script reference template actually changed between 1.6 and 2.0. I’d have to rewrite our parser to release something with the 1.6.x classes (we wrote it for the 2.0 alpha).

I’ll email a link to the alpha mailing list, but everyone else will have to wait a bit. Sorry!

As another update–added support for AddComponent/GetComponent parsing. It’ll bring up the autocomplete as you type:

Hmmm… we -really- need an OS X version of this…

Sadly, looks like FlashDevelop itself won’t support OSX anytime soon. Shouldn’t be too bad in a Parallels/Coherence environment, though:

http://www.flashdevelop.org/community/viewtopic.php?t=855&highlight=mono