Search Unity

Does unity still support Javascript?

Discussion in 'General Discussion' started by tenh_un, Jun 24, 2019.

  1. tenh_un

    tenh_un

    Joined:
    Jun 24, 2019
    Posts:
    5
    I am a new person who use unity because of some reasons. Some people say it still support javascript but some say it doesn't.

    However, when i create a script I see only C# script. how can I create javascript script in unity? does it still support javascript?
     
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
    Nope.
     
    xVergilx and tenh_un like this.
  3. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    No it's been phased out. Older versions support it. Newer ones don't, though they might convert javascripts into C# at import. Pity cus I used to write solely in javascript and was forced to move to C#. It's not too bad, just fiddly on the syntax.
     
    Peter77 and tenh_un like this.
  4. tenh_un

    tenh_un

    Joined:
    Jun 24, 2019
    Posts:
    5
  5. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
    Yeah, his answer was a lot better than mine. :D
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I believe Unity 2018.2.21 is the latest version of Unity which included the compiler for UnityScript (JavaScript), and Unity 2017.1.5 was the last version in which you could create those file in the editor. It was officially deprecated with Unity 2017.2.0, and 2018.3.0 was the first version in which you simply couldn't use UnityScript.
     
  7. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    If you want to use Javascript and have no need for the latest Unity (platform changes may require a recent version, common on mobile for example), you could always an old release. All of them back to Unity 3.x are available here:

    https://unity3d.com/get-unity/download/archive
     
  8. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    Just be aware that the number of people able to provide support is likely small now. I know I don't remember too many of the differences from 5.6, and I don't want to take the time to look them up that often so I tend to ignore threads that need help with really old releases.
     
    Lurking-Ninja and Joe-Censored like this.
  9. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Before you go using an old version just to get JavaScript, it’s worth noting Unity has never supported actual JavaScript.

    What they did support was UnityScript. Which has about as much relation to JavaScript as JavaScript does to Java.

    UnityScript was basically C# with a bit of syntactic sugar added on top. It behaved like C#. It mostly looked like C#. The name was a pure marketing gimmick.
     
    Joe-Censored, RecursiveFrog and Ryiah like this.