What language can Unity3d use best?

Unityscript, Javascript, Boo, or CSharp

As per my personal opinion c#

Hi Kevin,

As Aldo also says above, there’s no difference on the compiled code, so, there’s no difference in performance. Therefore, if you want to chose a language to learn and use you’d have to look at it from different perspectives, e.g:

Which language is easier to learn? I think Unityscript (similar to Actionscript, which is similar to Javascript). Unityscript will let you be less strict with with how you write code. Most importantly, it doesn’t require that you declare up front the type of a variable (e.g. integer, boolean. etc). This can be handy, but if you want to build for Android it doesn’t work. Android wants to know the variable types even in Unityscript.

Which language is more powerful? In my opinion C#. I would loosely compare C# to Java (not Javascript). Java and C# are programming languages, while Javascript is a scripting language.

If you learn C# you’ll be able to understand Javascript code, and even translate it to C# with little effort (or even write it). The opposite is not true: If you know Javascript, it will not be equally easy to translate C# to Javascript. This is important, because there are many ready-made scripts (both in Unityscript and C#) for Unity out there that might want to use for your game.

So, I’d say that if you go for C# you can’t be wrong, but if you find C# overwhelming, Unityscript will do the job just fine. I have no experience with Boo, so, I can’t say anything about that.

I think C# because unity’s self provided editor monodevelop compiles only on C#.net files…

And also in C# declaring variables without a datatype is not allowed, which makes unity to find and load variables faster…

Unityscript and Javascript are the same thing. I prefer to write in this language because the JS compiler is way more friendly than the C# one. On the other hand, you can find much more technical info about C# in the internet. There’s no difference in performance: the compiled code is basically the same for the 3 languages - your code is what can make the real difference.

I will try and be un-biased so you can make a decision as everyone has a different preference.

Unityscript:
Pros - Specific to Unity so is well integrated | Cons - Not so many people use it so harder to find tutorials and such.

Javascript:
Pros - Very popular and there is a lot of support | Cons - you can often create bottlenecks without noticing that slows performance

Boo script: I have not used this so will not attempt to comment :slight_smile:

C#:
Pros - Fast script that allows more than just game scripts such as unity addons | Cons - Harder to learn.

I hope this helps and remember this is my personal opinion, Anyone else may feel free to expand on this.