Search Unity

Newbie question for unity3d Developers (Javascript or c#)

Discussion in 'Scripting' started by ganon, Sep 11, 2009.

  1. ganon

    ganon

    Joined:
    Mar 20, 2009
    Posts:
    22
    Hi all, I'm Sebastian Gana, flash Game Developer from Chile (SouthAmerica) and now i'm very interested to jump to 3d develop of Unity3d.

    My newbie question:

    What Programming Language do you prefer to use?
    C# or Javascript
    Why?
    And what language recommend me?

    :)

    Sorry my bad english.
     
  2. matthewminer

    matthewminer

    Joined:
    Aug 29, 2005
    Posts:
    331
    Unity's JavaScript is a lot like Flash's ActionScript, so that's probably your best choice as a Flash developer. Most of the examples are written in JavaScript, which makes learning easy.

    I prefer C# myself because I come from a Java programming background and the two strictly-typed languages are quite similar. But there really isn't a "best" language, and you'll find that both are used heavily. It all comes down to personal preference. Also note that both C# and JS scripts can be used in the same project.
     
  3. DrHotbunz

    DrHotbunz

    Joined:
    Feb 14, 2009
    Posts:
    315
    Most of the examples are in Javascript. Javascript rocks.
     
  4. neave

    neave

    Joined:
    Sep 15, 2009
    Posts:
    1
    On the same topic, are there any major speed differences between using C# and JavaScript? I would have thought C# would be more efficient and therefore quicker to execute, but is that not the case?

    Thanks!
     
  5. GargerathSunman

    GargerathSunman

    Joined:
    May 1, 2008
    Posts:
    1,571
    No, they're both compiled down to the same runtime code. That said, C# is more strict on syntax by default, so you'll probably end up with less dynamically-typed variables by necessity.

    However, if both your script in JavaScript and your script in C# was exactly the same (aside from syntax), they should run just as fast as each other.