Use of js and c # in unity. Equal performance?


I'm starting with unity. And I see that you can use c # and js to program. My question is whether both c # and js would have the same performance. And if js can do all the functions that c # can do.

asked by user3759 25.08.2016 в 22:04

2 answers


Unity uses UnityScript, a language with syntax similar to Javacript. Unfortunately it is usually called javascript (although it is not).

The three languages on which it is possible to program in Unity, that is, C #, UnityScript and Boo compile CIL (Common Intermediate Language). So the performance will depend on how each compiler is implemented.

In particular about the performance itself, the consensus is that they are similar, although it is a little better in C # (ie the difference is not significant).

Additionally, performance is not usually among the main reasons why it is advised to use C # over UnityScript. The reasons are usually:

  • UnityScript is not Javascript (knowing Javascript gives a negligible advantage)
  • Resources (most Unity assets are programmed in C #)
  • Maturity, support and evolution of C #
  • Links by way of references (in English):

    * [1]: link * [2]: link

    answered by 26.08.2016 / 04:41

    Nop, the performance is higher in C # since it is a compiled language and JavaScript interpreted. Yes, both programming languages in Unity3D have basically the same thing, check the documentation.

    I recommend you take some classes at:

    Microsoft Virtual Academy - Course for Development of Videogames with Unity3D



    answered by 25.08.2016 в 22:16