Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Should I learn Javascript or C# for Unity?

Discussion in 'Scripting' started by jkarateking, Nov 12, 2014.

Thread Status:
Not open for further replies.
  1. jkarateking

    jkarateking

    Joined:
    Dec 3, 2013
    Posts:
    127
    i have found loades of Unity tutorials but some use C# and some javascript. So I don't get mixed between the two I want to only use tutorials for either C# or javascript.
    Which scripting language is easier and more efficient for Unity?
    Would you recommending learning one then learning the other after?
     
  2. GetUpKidAK

    GetUpKidAK

    Joined:
    Apr 9, 2013
    Posts:
    84
    Well, Unity planning on supporting C# more for Unity 5, so that's one good reason for C#.

    I doubt either one is any more efficient than the other and how easy it is depends on whether you have any prior knowledge, really.
     
  3. DRRosen3

    DRRosen3

    Joined:
    Jan 30, 2014
    Posts:
    681
    In my experience JavaScript is easier to pick up on. However, C# is closer to the industry standard language, and (again in my experience) easier to read.
     
  4. Nubz

    Nubz

    Joined:
    Sep 22, 2012
    Posts:
    553
    This is actually a matter of opinion and personal preference.
    I found UnityScript and JavaScript annoying and confusing when I started.
     
  5. DRRosen3

    DRRosen3

    Joined:
    Jan 30, 2014
    Posts:
    681
    Well that's why I said, "in my experience...".
     
    JohnnyA and GetUpKidAK like this.
  6. cmcpasserby

    cmcpasserby

    Joined:
    Jul 18, 2014
    Posts:
    315
    C#, since UnityScript in nothing like real JS which adds to confusion, while C# is still a usefull language outside of untiy, that has better documentation and more libraries
     
  7. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    I'd recommend C# as well. There're alot of tutorials, many examples and quite some nice documentations. US isn't bad either, but i think the majority tends to use C# these days, so you'll probably be better of with it in the future.

    Additionally, as already mentioned, it's very useful if you wanna develop some programs outside of Unity later on, using C#. And once you know C#, you can easily switch to Java (not the same as JavaScript!) as they've got extremely much in common.
    C++ wouldn't be that far away either, although there are some distinct differences in how it works, 'syntax-wise' it would be rather easy.

    However, if you still decide to learn JavaScript/UnityScript, you'll have a fun too and once you understood one programming language, it's often quite easy to get into other languages as the principles are often similar, the syntax is the main difference.
     
  8. sam268

    sam268

    Joined:
    Apr 21, 2014
    Posts:
    149
    Well, I know C++, C#, and javascript/unityscript. And, despite what almost everybody on the forums will say, I LOOOOOOVE javascript compared to C#. I really have no good reason, I just like it better. So it is honestly whatever floats your boat.
     
  9. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    C# and it's been answered many times so I'm locking this.
     
    djfunkey and SteveJ like this.
Thread Status:
Not open for further replies.