HELP! Language Reference confusion??!!

I am new to both Unity and Javascript and although I’ve managed to find a LOT of language reference material on js, I can’t find much at all on Unity’s truncated or extended version of the language and it’s extremely frustrating.

I’ve seen code snippets here that contain language elements that I can find nowhere in either Unity guides or any js language guides … things like … the System class or System.Text.Encoding or ASCII.GetString(byte_array); just to name a few.

Is there ANY complete language reference that developers can use that spell out exactly what commands, statements and operators are actually legal to use in Unity - I’m finding it hard to get a proper handle on what can and can’t go into scripts.

Please help clear the confusion.

Thanks

Is this what you’re looking for?

Sadly no, but thank you for your reply. I already have this documentation and it’s not a language reference - it’s basically just a API reference documenting the Unity API and not the differences between Unity js and standard js.

The problem I’m having is knowing which parts of the standard js language may be different, removed, unsupported or enhanced in Unity. One example - I know js supports an XOR function/operator but Unity does not appear to or it’s not the same as normal js.

Additionally, I also get confused by the fact that a script appears to be able to have any of 3 language elements inside it without any way (for me) to identify one from the other unless I know all 3 languages and can see the difference. I barely know js, know nothing of c# and zero about Boo - hence the confusion.

Developer Suggestion
Perhaps limiting individual scripts to a single language and/or identifying which one is used via some header #pragma or similar might help newbies learn it better.

As you learn, remember that all of the languages supported by Unity (Unity Javascript, C#, and Boo) are based on Unity’s use of Mono, which is in turn based on the .NET CLR.

Some of the namespaces you reference (System, System.Text, etc) are part of the core mono libraries and are accessible from any Unity language (this is the power of mono / .NET).

As for “javascript”, its a bit of a misnomer, as Unity javascript has some significant differences from the javascript that most web developers know. The reference that NickAVV posted is a good place to start. The next best approach is to hack away at some scripts, and search the forums for issues you encounter. Nearly every syntax problem I’ve had was quickly solved with a forum search.

Welcome aboard and good luck!

CosmicMesh - thanks for the insight on Mono (more research)

As for the API - I have no real issues with it or the documentation so far. All of the API calls i’ve read about appear reasonably well commented but I’m still very new so that opinion may change.

The forums are never more than a single click away either.