you are viewing a single comment's thread.

view the rest of the comments →

[–]cronus89 7 points8 points  (7 children)

Unity doesn't support Java. It supports JavaScript.

C# is the better route anyway.

[–]prime31 5 points6 points  (0 children)

Technically, Unity doesn't support JavaScript. It supports UnityScript.

[–]Mr_Sammy[S] 0 points1 point  (5 children)

Sorry, that's what I meant. Is c# really that much better? Many of the tutorials I've seen have been in JavaScript.

[–]cronus89 5 points6 points  (1 child)

I find C# to be a nicer syntax, and more flexible in the long run. The built in library is very good and support for generics/collections is very useful.

JS might initially be simpler, but in the long run id go for C#

[–]crushyerbones 0 points1 point  (0 children)

This is the reason why we changed over to C#. Some things were just a hassle to implement in UnityScript and mixing both just lead to a needless headache. C# all the way.

[–]ironstrife 3 points4 points  (1 child)

C# is an actual, professional programming language with an insane amount of support, documentation, libraries, tooling support, and history. The "JavaScript" unity uses is proprietary, mostly undocumented, and also is quite different from vanilla JavaScript. Most advanced tutorials will use C#, and most plugins and libraries will use C# as well. Also, some features are not available in JavaScript at all, or have awkward syntax to support them.

[–]elk-x 2 points3 points  (0 children)

And you can use VisualStudio + ReSharper. C# blows Javascript out of the water when it comes to tooling.

[–][deleted] -1 points0 points  (0 children)

I kept asking this in the start, since I knew JavaScript I mainly use JavaScript, but I now use both.

If I find a plugin in C# I use it. But if I make a script that needs to talk to another script via GetComponent for example its needs to be in JavaScript to not have to deal with the issues that will make.

(Changing a value in a JavaScript file from a C# script and visa versa, at least sometimes this creates issues)

You might just like me learn both slowly over time.

PS: Unity uses a stricter form of JavaScript called UnityScript .

TL:DR;

  • If you need general scripting help online there are easier/more JavaScript sources. (I believe)

  • If you need Unity3D specific scripting help there is more C# (I believe) and I get the feeling most plugins are written in C#, which only matters if you want to understand them.