Newbie question for unity3d Developers (Javascript or c#)

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?

:slight_smile:

Sorry my bad english.

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.

Most of the examples are in Javascript. Javascript rocks.

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!

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.