DO NOT use this tag to describe Unity scripts which are written in C#! UnityScript is a separate language and should be used only on questions explicitly using that language. UnityScript is a DEPRECATED scripting language used by the Unity game engine in versions prior to 2018.2. It is often mistakenly referred to as Javascript, but does not follow the ecmascript standards.
UnityScript was one of the scripting languages used by the unity-game-engine prior to version 2018.2. It features classes, strict typing, and is generally developed within the mono framework, (similar to .Net but designed to be cross platform) among other features.
Although UnityScript is sometimes referred to as "JavaScript", it is a different language, that does not follow the ecmascript standard. From the Unity3D wiki:
Though many in the Unity development community (and even in the Unity corporation) refer to UnityScript and JavaScript as if they were equivalent or interchangeable, the two are very different languages. Though they resemble each other syntactically, they have very different semantics.
The semantics of UnityScript resemble java with the main difference (and really its biggest similarity to javascript) being the ability to have dynamically typed objects.
In the Unity blog "UnityScript’s long ride off into the sunset" it was announced that starting from Unity 2017.2 the ability to create a "UnityScript" has been removed from the "Create Assets" menu as one of the first steps taken to deprecating UnityScript. UnityScripts can however still be made in this version through other means.
As of Unity version 2018.2, support for UnityScript has been completely removed. A tool to convert UnityScript to C# scripts has been released by Unity to help UnityScript users transfer over to C#. More detailed information and a how-to can be found in the Unity blog "UnityScript to C# Conversion Tool"
References
- UnityScript versus JavaScript (on Unity3D wiki)
- Head First into Unity with UnityScript (on Unity3D wiki)
- Unity Script Reference