UnityScript reference

Hi all. I’m a new Unity user. Is there a reference to what is supported in UnityScript? Assuming it was basically JavaScript/ECMAScript I tried to create classes with the function keyword but got told off by the parser. I’m not so familiar with scripting languages as I’ve been a C++ programmer a good chunk of my life. Eventually I tried the class keyword and presto! So I thinks to myself: hmmm… Tried enum. Works! I then replaced all my state integers with meaningful words. Then I tried the extends keyword and it also works. (I noticed that you don’t need to explicitly call super() as the parent constructor gets called regardless.) All interesting and very useful. But I wonder if there’s some sort of reference or at least delta doc of UnityScript versus ECMA/JS. It seems that UnityScript has adopted some of the proposals of future ECMA, which is just fine by me as I found using function() to create a class somewhat daggy. Or do I keep digging up these little treasures by trial and error?

Finally, a plug for Unity: I tinkered with the demo but didn’t have much time to get into it. Later I had some time, and so purchased the iPhone basic license on 22 Feb this year. Today my first iPhone app is in the store. That’s a pretty good turnaround time using something I’m a newbie at (both iPhone and Unity). It really seems to be a very impressive dev tool. I’ll definitely be saving for the Pro version.

Unfortunately there is no official reference. You can use this, though. It’s basically JScript, rather than Javascript.

–Eric

Thanks! That looks very helpful.