Why C # and javascript will coexist in unity3d of scripts?

:roll: :roll: :roll:
C# than the JavaScript complex are much more trouble for Complete the same function。

Is c # faster?

sorry,teach fish to swim… :sweat_smile: :sweat_smile: :sweat_smile:

all scripts get compiled to .NET in the end.

Depending on the way you use, different things can be simpler in one language but can also be harder

Benefit of C# is that it does not hide what happens in reality (like new or the access to properties). Also C# is a standard language, you will find tousands of pages on it.
Unity “javascript” is only used in Unity and an alternative .net language, so you have far less resources on it but its simpler to use.

What is important and nearly a must unlike you intend to get headache, is that you decide for one language for your project and ensure that only that language is beeing used.

:slight_smile: :slight_smile: :slight_smile:
Thank you
because Examples are mostly javascript at unity’s Official website ,Converted into C# is too much troublesome… :frowning: :frowning: :frowning:

Only until you get the hang in C# likely.
But there is nothing that prevents you from working with JS only. Many do that

o,I like C sharp :smile:

Also, it is possible to reference back and forth between unityscript and C# classes. The key is to have the script you need to reference be compiled before the script referencing it. For more information on the compilation order, check out this docs page: file:///Applications/Unity/Documentation/ScriptReference/index.Script_compilation_28Advanced29.html

      1. Thank you

Here we go again :roll:.

OK. I’ll try to briefly summarize the 2.489 * 10^5.2 posts about UnityScript vs. C#

  • It’s Unityscript, not javascript. It’s closest relative is Jscript.NET. The more general programming concepts that are not in the Unity docs can be found on Microsoft’s developer website under Jscript.net. Some examples can run verbatim.

  • Unityscript is generally easier to learn and use than C#

  • Almost all Unityscript knowledge is applicable to C#. Once one knows Unityscript, C# looks much less scary.

  • C# is an industry standard, with many examples on the web and many books. None of which have to do with Unity, so they take some thought. The Unity docs also require minor translation.

  • C# is generally more powerful than Unityscript at the cost of its learning curve

  • Both languages basically do the same thing. Very similar syntax, same functions.

  • The two languages can interoperate (along with Boo). Just get the compilation order right.

  • And, finally, coding principles are more important than languages.

That’s everything I can think of at the moment.

Yes! :smile: :smile:
“It’s closest relative is Jscript.NET.” I also so think of…
:slight_smile: :slight_smile: :slight_smile: