I don’t know if there has been a topic about this but I can’t find one, so here it is…
I’m just starting with Unity having a C++ game dev background, it’s not a matter for me of “which one is easier to use”, but its pros and cons of each language when working with Unity.
Apart from syntax differences, where do they differ?
Can I do with JS absolutely everything (always talking about Unity) that I can with C#, and the opposite?
As far as I can tell, you can access all Unity features with JavaScript and C#, including the unusual ones such as attributes which associate functions with menu items. At one point, there were some features which were only accessible from C#, but I believe these have all been made accessible for JavaScript in recent versions.
At this point, it probably just comes down to a matter of preference and whether or not you want the specific features of a particular language (such as properties and all-encompassing static typing in C#).
Also keep in mind that currently some of the JS syntax or handling is actually leveraging the .Net framework… Such as strings, arrays and I believe some others that I can’t think of off the top of my head.
And can you not mix and match anyway, guys? Write scripts for X, Y and Z in one language and write scripts for A, B and C in the other (if you’re more comfortable? The scripts simply get pulled into the game (objects) anyways so can you not mix as needed?
I find JS a little less verbose and it is easy to use dynamic typing if you have the need. Coming from a C++ background I do not know if you would be interested in that
You can also produce .net dlls from JavaScript code. The JavaScript compiler is located at /Applications/Unity/Unity.app/Contents/Frameworks/MonoCompiler.framework/us.exe